summaryrefslogtreecommitdiff
path: root/modules/gallery/lib/HTMLPurifier
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-07-16 10:44:23 -0700
committerBharat Mediratta <bharat@menalto.com>2009-07-16 10:44:23 -0700
commit2cd0d6389c39badc1c3c7963e03f80097eaac3c2 (patch)
tree0c2952c873431bc61f5754e1fdc37b553ee166d1 /modules/gallery/lib/HTMLPurifier
parenta333e01bd1c8cb3ad08cd0ad16023e3fcdfc4181 (diff)
Revert "Remove trailing ?>."
This reverts commit a333e01bd1c8cb3ad08cd0ad16023e3fcdfc4181.
Diffstat (limited to 'modules/gallery/lib/HTMLPurifier')
-rw-r--r--modules/gallery/lib/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php50
1 files changed, 25 insertions, 25 deletions
diff --git a/modules/gallery/lib/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php b/modules/gallery/lib/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php
index 81305bcf..731c3171 100644
--- a/modules/gallery/lib/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php
+++ b/modules/gallery/lib/HTMLPurifier/HTMLPurifier/Lexer/PH5P.php
@@ -3,7 +3,7 @@
/**
* Experimental HTML5-based parser using Jeroen van der Meer's PH5P library.
* Occupies space in the HTML5 pseudo-namespace, which may cause conflicts.
- *
+ *
* @note
* Recent changes to PHP's DOM extension have resulted in some fatal
* error conditions with the original version of PH5P. Pending changes,
@@ -11,7 +11,7 @@
*/
class HTMLPurifier_Lexer_PH5P extends HTMLPurifier_Lexer_DOMLex {
-
+
public function tokenizeHTML($html, $config, $context) {
$new_html = $this->normalize($html, $config, $context);
$new_html = $this->wrapHTML($new_html, $config, $context);
@@ -32,31 +32,31 @@ class HTMLPurifier_Lexer_PH5P extends HTMLPurifier_Lexer_DOMLex {
, $tokens);
return $tokens;
}
-
+
}
/*
-Copyright 2007 Jeroen van der Meer <http://jero.net/>
+Copyright 2007 Jeroen van der Meer <http://jero.net/>
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -1075,7 +1075,7 @@ class HTML5 {
// used when parsing entities in text and in attributes.
// The behaviour depends on the identity of the next character (the
- // one immediately after the U+0026 AMPERSAND character):
+ // one immediately after the U+0026 AMPERSAND character):
switch($this->character($this->char + 1)) {
// U+0023 NUMBER SIGN (#)
@@ -2231,7 +2231,7 @@ class HTML5TreeConstructer {
if($this->elementInScope($token['name'])) {
$this->generateImpliedEndTags();
- }
+ }
if(end($this->stack)->nodeName !== $token['name']) {
/* Now, if the current node is not an element with the
@@ -2610,7 +2610,7 @@ class HTML5TreeConstructer {
for($x = count($this->stack) - $n; $x >= $n; $x--) {
array_pop($this->stack);
}
-
+
} else {
$category = $this->getElementCategory($node);
@@ -3546,7 +3546,7 @@ class HTML5TreeConstructer {
// In theory, this should ever be needed, but just in case
if ($token['name'] === '') $token['name'] = 'span'; // arbitrary generic choice
}
-
+
$el = $this->dom->createElement($token['name']);
foreach($token['attr'] as $attr) {
@@ -3903,4 +3903,4 @@ class HTML5TreeConstructer {
return $this->dom;
}
}
-
+?>