1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 03:10:09 +02:00

[2.0.1] Revamp error collector scheme: we now have custom mocks and an exchange of responsibilities

- Fix oversight in AutoParagraph dealing with armor.
- Order errors with no line number last
- Language object now needs $config and $context objects to do parameterized objects
- Auto-close notice added
- Token constructors accept line numbers

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1245 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-06-26 19:33:37 +00:00
parent 275932ec05
commit 6a95d91a1a
17 changed files with 248 additions and 109 deletions

View File

@@ -38,7 +38,7 @@ class HTMLPurifier_Injector_AutoParagraph extends HTMLPurifier_Injector
if (empty($this->currentNesting)) {
if (!$this->allowsElement('p')) return;
// case 1: we're in root node (and it allows paragraphs)
$token = array(new HTMLPurifier_Token_Start('p'));
$token = array($this->_pStart());
$this->_splitText($text, $token);
} elseif ($this->currentNesting[count($this->currentNesting)-1]->name == 'p') {
// case 2: we're in a paragraph
@@ -229,7 +229,6 @@ class HTMLPurifier_Injector_AutoParagraph extends HTMLPurifier_Injector
array_pop($result);
}
}
/**