mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-03 05:11:52 +00:00
Move out Stage 2 docs to correct class.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@141 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
626cfc1172
commit
145a51da5a
@ -54,22 +54,14 @@ HTML tags. Things like blog comments are, in all likelihood, most appropriately
|
|||||||
written in an extremely restrictive set of markup that doesn't require
|
written in an extremely restrictive set of markup that doesn't require
|
||||||
all this functionality (or not written in HTML at all).
|
all this functionality (or not written in HTML at all).
|
||||||
|
|
||||||
== STAGE 2 - remove foreign elements ==
|
The rest of this document is pending moving into their associated classes.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Status: A- (transformations need to be implemented)
|
|
||||||
|
|
||||||
At this point, the parser needs to start knowing about the DTD. Since we
|
|
||||||
hold everything in an associative $info array, if it's set, it's valid, and
|
|
||||||
we can include. Otherwise zap it, or attempt to figure out what they meant.
|
|
||||||
<stronf>? A misspelling of <strong>! This feature may be too sugary though.
|
|
||||||
|
|
||||||
One last thing: the remove foreign elements has to do the element
|
|
||||||
transformations, from FONT to SPAN, etc.
|
|
||||||
|
|
||||||
font -> span
|
|
||||||
size CDATA #IMPLIED
|
|
||||||
color %Color; #IMPLIED
|
|
||||||
face CDATA #IMPLIED
|
|
||||||
|
|
||||||
|
|
||||||
== STAGE 3 - make well formed ==
|
== STAGE 3 - make well formed ==
|
||||||
|
@ -9,7 +9,8 @@ require_once 'HTMLPurifier/TagTransform.php';
|
|||||||
* Removes all unrecognized tags from the list of tokens.
|
* Removes all unrecognized tags from the list of tokens.
|
||||||
*
|
*
|
||||||
* This strategy iterates through all the tokens and removes unrecognized
|
* This strategy iterates through all the tokens and removes unrecognized
|
||||||
* tokens.
|
* tokens. If a token is not recognized but a TagTransform is defined for
|
||||||
|
* that element, the element will be transformed accordingly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class HTMLPurifier_Strategy_RemoveForeignElements extends HTMLPurifier_Strategy
|
class HTMLPurifier_Strategy_RemoveForeignElements extends HTMLPurifier_Strategy
|
||||||
|
Loading…
Reference in New Issue
Block a user