From 8d6bfa40374989d432b74e89a0d92724b4bd38cf Mon Sep 17 00:00:00 2001
From: "Edward Z. Yang"
Date: Sun, 21 Jan 2007 15:09:07 +0000
Subject: [PATCH] [1.4.0] YouTube preservation code added to the core by adding
HTMLPurifier_Filter hierarchy.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@673 48356398-32a2-884e-a903-53898d9a118a
---
NEWS | 3 ++
TODO | 1 -
docs/enduser-youtube.html | 7 +++--
library/HTMLPurifier.php | 17 +++++++++++
library/HTMLPurifier/Filter.php | 39 +++++++++++++++++++++++++
library/HTMLPurifier/Filter/YouTube.php | 34 +++++++++++++++++++++
smoketests/preserveYouTube.php | 29 +++---------------
7 files changed, 101 insertions(+), 29 deletions(-)
create mode 100644 library/HTMLPurifier/Filter.php
create mode 100644 library/HTMLPurifier/Filter/YouTube.php
diff --git a/NEWS b/NEWS
index 31ec8718..2bd97555 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,9 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
characters while %Core.Encoding is set to a non-UTF-8 encoding.
! Support for configuration directive aliases added
! Config object can now be instantiated from ini files
+! YouTube preservation code added to the core, with two lines of code
+ you can add it as a filter to your code. See smoketests/preserveYouTube.php
+ for sample code.
- Replaced version check with functionality check for DOM (thanks Stephen
Khoo)
. Added smoketest 'all.php', which loads all other smoketests via frames
diff --git a/TODO b/TODO
index 8942453c..6d5cf64f 100644
--- a/TODO
+++ b/TODO
@@ -8,7 +8,6 @@ TODO List
==========================
1.4 release
- # Add hooks for custom behavior (for instance, YouTube preservation)
- Aggressive caching
? Configuration profiles: sets of directives that get set with one func call
diff --git a/docs/enduser-youtube.html b/docs/enduser-youtube.html
index c70d7b44..0cfd3587 100644
--- a/docs/enduser-youtube.html
+++ b/docs/enduser-youtube.html
@@ -172,9 +172,10 @@ introduced after it has finished.
Future plans
-It would probably be a good idea if this code was added to the core
-library. Look out for the inclusion of this into the core as a decorator
-or the like.
+This functionality is part of the core library, using the
+HTMLPurifier_Filter class to acheive the desired effect. Our implementation
+is slightly different, and this page will be updated to reflect that
+once 1.4.0 is released.