From c0d547697be148b32be4ca0c2f204613518b3cf9 Mon Sep 17 00:00:00 2001 From: Alexandra Nantel Date: Tue, 23 May 2017 10:58:05 -0400 Subject: [PATCH 1/4] PHP7 Compatibility release --- extension.meta.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extension.meta.xml b/extension.meta.xml index e56bf66..54e4586 100644 --- a/extension.meta.xml +++ b/extension.meta.xml @@ -14,6 +14,9 @@ + + - PHP7 Compatibility + - Mark compatibility with Symphony 2.x.x From 94a4f0828c864bdac2160b2a92a69c3ca26cdbe7 Mon Sep 17 00:00:00 2001 From: Alexandra Nantel Date: Thu, 24 Aug 2017 15:44:49 -0400 Subject: [PATCH 2/4] SQL and PHP cases PHP true,false,null in lowercase SQL keywords uppercase --- .../HTMLPurifier.standalone.php | 856 +++++++++--------- lib/php-smartypants-1.5.1f/smartypants.php | 68 +- 2 files changed, 462 insertions(+), 462 deletions(-) diff --git a/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php b/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php index 64dbf10..364b2d3 100644 --- a/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php +++ b/lib/htmlpurifier-4.6.0-standalone/HTMLPurifier.standalone.php @@ -309,8 +309,8 @@ public static function getInstance($prototype = null) } } - - + + /** @@ -361,7 +361,7 @@ public static function flatten($node, $config, $context) { if ($level > 0) { $tokens[] = $start; } - if ($end !== NULL) { + if ($end !== null) { $closingTokens[$level][] = $end; } if ($node instanceof HTMLPurifier_Node_Element) { @@ -382,7 +382,7 @@ public static function flatten($node, $config, $context) { return $tokens; } } - + /** @@ -525,8 +525,8 @@ public function expandIdentifiers(&$attr, $attr_types) } } - - + + /** @@ -664,8 +664,8 @@ protected function expandCSSEscape($string) } } - - + + /** @@ -725,8 +725,8 @@ public function confiscateAttr(&$attr, $key) } } - - + + /** @@ -822,8 +822,8 @@ public function set($type, $impl) } } - - + + /** @@ -1001,8 +1001,8 @@ public function validateToken($token, $config, $context) } - - + + // constants are slow, so we use as few as possible @@ -1127,8 +1127,8 @@ public static function registerAutoload() } } - - + + /** @@ -1183,8 +1183,8 @@ public function setup($config) } } - - + + /** @@ -1658,8 +1658,8 @@ protected function setupConfigStuff($config) } } - - + + /** @@ -1711,8 +1711,8 @@ public function getAllowedElements($config) abstract public function validateChildren($children, $config, $context); } - - + + /** @@ -2623,8 +2623,8 @@ public function serialize() } - - + + /** @@ -2800,8 +2800,8 @@ public function postProcess() } } - - + + /** @@ -2971,8 +2971,8 @@ protected function convertToLookup($string) } } - - + + /** @@ -3067,8 +3067,8 @@ public function loadArray($context_array) } } - - + + /** @@ -3197,8 +3197,8 @@ abstract public function flush($config); abstract public function cleanup($config); } - - + + /** @@ -3304,8 +3304,8 @@ public function addDecorator($decorator) } } - - + + /** @@ -3378,8 +3378,8 @@ public function __construct( } } - - + + class HTMLPurifier_DoctypeRegistry @@ -3521,8 +3521,8 @@ public function getDoctypeFromConfig($config) } } - - + + /** @@ -3738,8 +3738,8 @@ private function _mergeAssocArray(&$a1, $a2) } } - - + + /** @@ -4350,8 +4350,8 @@ public static function testEncodingSupportsASCII($encoding, $bypass = false) } } - - + + /** @@ -4399,8 +4399,8 @@ public static function instance($prototype = false) } } - - + + // if want to implement error collecting here, we'll need to use some sort @@ -4553,8 +4553,8 @@ protected function specialEntityCallback($matches) } } - - + + /** @@ -4798,8 +4798,8 @@ private function _renderStruct(&$ret, $struct, $line = null, $col = null) } } - - + + /** @@ -4873,8 +4873,8 @@ public function addError($severity, $message) } } - - + + /** @@ -4886,8 +4886,8 @@ class HTMLPurifier_Exception extends Exception } - - + + /** @@ -4943,8 +4943,8 @@ public function postFilter($html, $config, $context) } } - - + + /** @@ -5230,8 +5230,8 @@ public function escape($string, $quote = null) } } - - + + /** @@ -5724,8 +5724,8 @@ public function parseTinyMCEAllowedList($list) } } - - + + /** @@ -6009,8 +6009,8 @@ public function setup($config) } } - - + + class HTMLPurifier_HTMLModuleManager @@ -6469,8 +6469,8 @@ public function getElement($name, $trusted = null) } } - - + + /** @@ -6527,8 +6527,8 @@ public function load($array_of_ids) } } - - + + /** @@ -6809,8 +6809,8 @@ public function notifyEnd($token) } } - - + + /** @@ -7014,8 +7014,8 @@ public function formatMessage($key, $args = array()) } } - - + + /** @@ -7224,8 +7224,8 @@ public function loadLanguage($code) } } - - + + /** @@ -7385,8 +7385,8 @@ public function compareTo($l) } } - - + + /** @@ -7743,8 +7743,8 @@ public function extractBody($html) } } - - + + /** @@ -7793,8 +7793,8 @@ abstract class HTMLPurifier_Node abstract public function toTokenPair(); } - - + + /** @@ -7905,8 +7905,8 @@ public function normalize($string) } } - - + + /** @@ -8028,8 +8028,8 @@ public function setParent($plist) } } - - + + /** @@ -8071,8 +8071,8 @@ public function accept() } } - - + + /** @@ -8110,7 +8110,7 @@ public function shift() { $this->input = array(); } if (empty($this->output)) { - return NULL; + return null; } return array_pop($this->output); } @@ -8129,7 +8129,7 @@ public function isEmpty() { return empty($this->input) && empty($this->output); } } - + /** @@ -8155,8 +8155,8 @@ abstract class HTMLPurifier_Strategy abstract public function execute($tokens, $config, $context); } - - + + /** @@ -8203,8 +8203,8 @@ public function resetAccessed() } } - - + + /** @@ -8340,8 +8340,8 @@ protected function parseHandle($fh) } } - - + + /** @@ -8378,8 +8378,8 @@ protected function prependCSS(&$attr, $css) } } - - + + /** @@ -8479,8 +8479,8 @@ public function rawPosition($l, $c) abstract public function toNode(); } - - + + /** @@ -8598,8 +8598,8 @@ public function createComment($data) } } - - + + /** @@ -8913,8 +8913,8 @@ public function isBenign($config, $context) } } - - + + class HTMLPurifier_URIDefinition extends HTMLPurifier_Definition @@ -9026,8 +9026,8 @@ public function postFilter(&$uri, $config, $context) } - - + + /** @@ -9101,8 +9101,8 @@ public function prepare($config) abstract public function filter(&$uri, $config, $context); } - - + + /** @@ -9173,8 +9173,8 @@ public function parse($uri) } - - + + /** @@ -9276,8 +9276,8 @@ public function validate(&$uri, $config, $context) } } - - + + /** @@ -9358,8 +9358,8 @@ public function register($scheme, $scheme_obj) } } - - + + /** @@ -9666,8 +9666,8 @@ private function scale($r, $scale) } } - - + + /** @@ -9720,7 +9720,7 @@ class HTMLPurifier_VarParser /** * Validate a variable according to type. - * It may return NULL as a valid type if $allow_null is true. + * It may return null as a valid type if $allow_null is true. * * @param mixed $var Variable to validate * @param int $type Type of variable, see HTMLPurifier_VarParser->types @@ -9865,8 +9865,8 @@ public static function getTypeName($type) } } - - + + /** @@ -9877,8 +9877,8 @@ class HTMLPurifier_VarParserException extends HTMLPurifier_Exception } - - + + /** @@ -9895,7 +9895,7 @@ class HTMLPurifier_VarParserException extends HTMLPurifier_Exception * fill it back in as necessary. (ToDo: Maybe it's more user friendly * to implicitly track the current element?) * - * Nota bene: the current class gets confused if you try to store NULLs + * Nota bene: the current class gets confused if you try to store nulls * in the list. */ @@ -9925,9 +9925,9 @@ static public function fromArray($array) { * the hole with a value. (Usually you should supply a $t, unless you * are at the end of the array.) */ - public function toArray($t = NULL) { + public function toArray($t = null) { $a = $this->front; - if ($t !== NULL) $a[] = $t; + if ($t !== null) $a[] = $t; for ($i = count($this->back)-1; $i >= 0; $i--) { $a[] = $this->back[$i]; } @@ -9940,8 +9940,8 @@ public function toArray($t = NULL) { * @return Original contents of new hole. */ public function next($t) { - if ($t !== NULL) array_push($this->front, $t); - return empty($this->back) ? NULL : array_pop($this->back); + if ($t !== null) array_push($this->front, $t); + return empty($this->back) ? null : array_pop($this->back); } /** @@ -9963,8 +9963,8 @@ public function advance($t, $n) { * @return Original contents of new hole. */ public function prev($t) { - if ($t !== NULL) array_push($this->back, $t); - return empty($this->front) ? NULL : array_pop($this->front); + if ($t !== null) array_push($this->back, $t); + return empty($this->front) ? null : array_pop($this->front); } /** @@ -9973,7 +9973,7 @@ public function prev($t) { * @return Original contents of new hole. */ public function delete() { - return empty($this->back) ? NULL : array_pop($this->back); + return empty($this->back) ? null : array_pop($this->back); } /** @@ -9989,7 +9989,7 @@ public function done() { * @param Element to insert */ public function insertBefore($t) { - if ($t !== NULL) array_push($this->front, $t); + if ($t !== null) array_push($this->front, $t); } /** @@ -9997,7 +9997,7 @@ public function insertBefore($t) { * @param Element to insert */ public function insertAfter($t) { - if ($t !== NULL) array_push($this->back, $t); + if ($t !== null) array_push($this->back, $t); } /** @@ -10036,7 +10036,7 @@ public function splice($t, $delete, $replacement) { return array($old, $r); } } - + /** @@ -10142,8 +10142,8 @@ public function validate($css, $config, $context) } - - + + /** @@ -10187,8 +10187,8 @@ public function make($string) } } - - + + // Enum = Enumerated @@ -10261,8 +10261,8 @@ public function make($string) } } - - + + /** @@ -10353,8 +10353,8 @@ public function validate($integer, $config, $context) } } - - + + /** @@ -10440,8 +10440,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -10494,8 +10494,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -10516,8 +10516,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -10628,8 +10628,8 @@ public function validate($uri, $config, $context) } } - - + + /** @@ -10713,8 +10713,8 @@ public function validate($number, $config, $context) } } - - + + class HTMLPurifier_AttrDef_CSS_AlphaValue extends HTMLPurifier_AttrDef_CSS_Number @@ -10748,8 +10748,8 @@ public function validate($number, $config, $context) } } - - + + /** @@ -10860,8 +10860,8 @@ public function validate($string, $config, $context) } } - - + + /* W3C says: @@ -11018,8 +11018,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -11075,8 +11075,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -11181,8 +11181,8 @@ public function validate($color, $config, $context) } } - - + + /** @@ -11230,8 +11230,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -11275,8 +11275,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -11353,8 +11353,8 @@ public function validate($value, $config, $context) } } - - + + /** @@ -11530,8 +11530,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -11750,8 +11750,8 @@ public function validate($string, $config, $context) } - - + + /** @@ -11783,8 +11783,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -11840,8 +11840,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -11918,8 +11918,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12031,8 +12031,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12103,8 +12103,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12158,8 +12158,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12205,8 +12205,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12280,8 +12280,8 @@ public function validate($uri_string, $config, $context) } } - - + + /** @@ -12332,8 +12332,8 @@ public function make($string) } } - - + + /** @@ -12403,8 +12403,8 @@ protected function filter($tokens, $config, $context) } } - - + + /** @@ -12453,7 +12453,7 @@ protected function filter($tokens, $config, $context) return $ret; } } - + /** @@ -12504,8 +12504,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12543,8 +12543,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12649,8 +12649,8 @@ public function validate($id, $config, $context) } } - - + + /** @@ -12726,8 +12726,8 @@ public function make($string) } } - - + + /** @@ -12783,8 +12783,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12856,8 +12856,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -12917,8 +12917,8 @@ public function validate($string, $config, $context) } } - - + + abstract class HTMLPurifier_AttrDef_URI_Email extends HTMLPurifier_AttrDef @@ -12938,8 +12938,8 @@ public function unpack($string) // sub-implementations - - + + /** @@ -13067,8 +13067,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -13113,8 +13113,8 @@ protected function _loadRegex() } } - - + + /** @@ -13203,8 +13203,8 @@ public function validate($aIP, $config, $context) } } - - + + /** @@ -13233,8 +13233,8 @@ public function validate($string, $config, $context) } } - - + + /** @@ -13262,8 +13262,8 @@ public function transform($attr, $config, $context) } } - - + + // this MUST be placed in post, as it assumes that any value in dir is valid @@ -13290,8 +13290,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13319,8 +13319,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13367,8 +13367,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13394,8 +13394,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13463,8 +13463,8 @@ public function transform($attr, $config, $context) } } - - + + // must be called POST validation @@ -13512,8 +13512,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13574,8 +13574,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13631,8 +13631,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13663,8 +13663,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13709,8 +13709,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13743,8 +13743,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13785,15 +13785,15 @@ public function transform($attr, $config, $context) } } - - + + // must be called POST validation /** * Adds rel="nofollow" to all outbound links. This transform is - * only attached if Attr.Nofollow is TRUE. + * only attached if Attr.Nofollow is true. */ class HTMLPurifier_AttrTransform_Nofollow extends HTMLPurifier_AttrTransform { @@ -13838,8 +13838,8 @@ public function transform($attr, $config, $context) } } - - + + class HTMLPurifier_AttrTransform_SafeEmbed extends HTMLPurifier_AttrTransform @@ -13864,8 +13864,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13893,8 +13893,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13973,8 +13973,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -13997,15 +13997,15 @@ public function transform($attr, $config, $context) } } - - + + // must be called POST validation /** * Adds target="blank" to all outbound links. This transform is - * only attached if Attr.TargetBlank is TRUE. This works regardless + * only attached if Attr.TargetBlank is true. This works regardless * of whether or not Attr.AllowedFrameTargets */ class HTMLPurifier_AttrTransform_TargetBlank extends HTMLPurifier_AttrTransform @@ -14043,8 +14043,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -14071,8 +14071,8 @@ public function transform($attr, $config, $context) } } - - + + /** @@ -14139,8 +14139,8 @@ public function validateChildren($children, $config, $context) } } - - + + /** @@ -14242,8 +14242,8 @@ public function validateChildren($children, $config, $context) } } - - + + /** @@ -14281,8 +14281,8 @@ public function validateChildren($children, $config, $context) } } - - + + /** @@ -14368,8 +14368,8 @@ public function validateChildren($children, $config, $context) } } - - + + /** @@ -14487,8 +14487,8 @@ public function validateChildren($children, $config, $context) } } - - + + /** @@ -14533,8 +14533,8 @@ public function validateChildren($children, $config, $context) } } - - + + /** @@ -14644,8 +14644,8 @@ private function init($config) } } - - + + /** @@ -14869,8 +14869,8 @@ public function validateChildren($children, $config, $context) } } - - + + class HTMLPurifier_DefinitionCache_Decorator extends HTMLPurifier_DefinitionCache @@ -14982,8 +14982,8 @@ public function cleanup($config) } } - - + + /** @@ -15059,8 +15059,8 @@ public function cleanup($config) } } - - + + class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCache @@ -15345,8 +15345,8 @@ private function _testPermissions($dir, $chmod) } } - - + + /** @@ -15424,8 +15424,8 @@ public function get($config) } } - - + + /** @@ -15510,8 +15510,8 @@ public function get($config) } } - - + + /** @@ -15555,8 +15555,8 @@ public function setup($config) } } - - + + class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTMLModule @@ -15587,8 +15587,8 @@ class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTMLModule ); } - - + + /** @@ -15643,8 +15643,8 @@ public function getChildDef($def) } } - - + + /** @@ -15834,8 +15834,8 @@ public function setup($config) } } - - + + /** @@ -15875,8 +15875,8 @@ public function setup($config) } } - - + + /** @@ -15927,8 +15927,8 @@ public function setup($config) } } - - + + /** @@ -15977,8 +15977,8 @@ public function setup($config) } } - - + + /** @@ -16164,8 +16164,8 @@ public function setup($config) } } - - + + /** @@ -16216,8 +16216,8 @@ public function setup($config) } } - - + + class HTMLPurifier_HTMLModule_Name extends HTMLPurifier_HTMLModule @@ -16243,8 +16243,8 @@ public function setup($config) } } - - + + /** @@ -16269,8 +16269,8 @@ public function setup($config) } } - - + + class HTMLPurifier_HTMLModule_NonXMLCommonAttributes extends HTMLPurifier_HTMLModule @@ -16290,8 +16290,8 @@ class HTMLPurifier_HTMLModule_NonXMLCommonAttributes extends HTMLPurifier_HTMLMo ); } - - + + /** @@ -16353,8 +16353,8 @@ public function setup($config) } } - - + + /** @@ -16396,8 +16396,8 @@ public function setup($config) } } - - + + /** @@ -16437,8 +16437,8 @@ public function setup($config) } } - - + + /** @@ -16474,8 +16474,8 @@ public function setup($config) } } - - + + /** @@ -16515,8 +16515,8 @@ public function setup($config) } } - - + + /** @@ -16578,8 +16578,8 @@ public function setup($config) } } - - + + /** @@ -16619,8 +16619,8 @@ public function setup($config) } } - - + + /* @@ -16693,8 +16693,8 @@ public function setup($config) } } - - + + /** @@ -16727,8 +16727,8 @@ public function setup($config) } } - - + + /** @@ -16803,8 +16803,8 @@ public function setup($config) } } - - + + /** @@ -16832,8 +16832,8 @@ public function setup($config) } } - - + + /** @@ -16857,8 +16857,8 @@ public function setup($config) } } - - + + /** @@ -16945,8 +16945,8 @@ public function setup($config) } } - - + + /** @@ -17176,8 +17176,8 @@ public function makeFixes() } } - - + + class HTMLPurifier_HTMLModule_XMLCommonAttributes extends HTMLPurifier_HTMLModule @@ -17197,8 +17197,8 @@ class HTMLPurifier_HTMLModule_XMLCommonAttributes extends HTMLPurifier_HTMLModul ); } - - + + /** @@ -17231,8 +17231,8 @@ public function makeFixes() } } - - + + class HTMLPurifier_HTMLModule_Tidy_Proprietary extends HTMLPurifier_HTMLModule_Tidy @@ -17266,8 +17266,8 @@ public function makeFixes() } } - - + + class HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 extends HTMLPurifier_HTMLModule_Tidy @@ -17446,8 +17446,8 @@ public function makeFixes() } } - - + + class HTMLPurifier_HTMLModule_Tidy_Strict extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 @@ -17490,8 +17490,8 @@ public function getChildDef($def) } } - - + + class HTMLPurifier_HTMLModule_Tidy_Transitional extends HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 @@ -17507,8 +17507,8 @@ class HTMLPurifier_HTMLModule_Tidy_Transitional extends HTMLPurifier_HTMLModule_ public $defaultLevel = 'heavy'; } - - + + class HTMLPurifier_HTMLModule_Tidy_XHTML extends HTMLPurifier_HTMLModule_Tidy @@ -17534,8 +17534,8 @@ public function makeFixes() } } - - + + /** @@ -17891,8 +17891,8 @@ private function _checkNeedsP($current) } } - - + + /** @@ -17932,8 +17932,8 @@ public function handleEnd(&$token) } } - - + + /** @@ -17992,8 +17992,8 @@ public function handleText(&$token) } } - - + + /** @@ -18064,8 +18064,8 @@ public function handleText(&$token) } } - - + + class HTMLPurifier_Injector_RemoveEmpty extends HTMLPurifier_Injector @@ -18166,8 +18166,8 @@ public function handleElement(&$token) } } - - + + /** @@ -18251,8 +18251,8 @@ public function handleEnd(&$token) } } - - + + /** @@ -18373,8 +18373,8 @@ public function handleEnd(&$token) } } - - + + /** @@ -18654,8 +18654,8 @@ protected function wrapHTML($html, $config, $context) } } - - + + /** @@ -19194,8 +19194,8 @@ public function parseAttributeString($string, $config, $context) } } - - + + /** @@ -19232,7 +19232,7 @@ public function toTokenPair() { return array(new HTMLPurifier_Token_Comment($this->data, $this->line, $this->col), null); } } - + /** @@ -19292,7 +19292,7 @@ public function toTokenPair() { } } - + /** @@ -19346,8 +19346,8 @@ public function toTokenPair() { } } - - + + /** @@ -19377,8 +19377,8 @@ public function execute($tokens, $config, $context) } } - - + + /** @@ -19395,8 +19395,8 @@ public function __construct() } } - - + + /** @@ -19577,8 +19577,8 @@ public function execute($tokens, $config, $context) } } - - + + /** @@ -19656,7 +19656,7 @@ public function execute($tokens, $config, $context) $e = $context->get('ErrorCollector', true); $i = false; // injector index list($zipper, $token) = HTMLPurifier_Zipper::fromArray($tokens); - if ($token === NULL) { + if ($token === null) { return array(); } $reprocess = false; // whether or not to reprocess the same token @@ -19760,7 +19760,7 @@ public function execute($tokens, $config, $context) } // handle case of document end - if ($token === NULL) { + if ($token === null) { // kill processing if stack is empty if (empty($this->stack)) { break; @@ -20178,8 +20178,8 @@ private function remove() } } - - + + /** @@ -20386,8 +20386,8 @@ public function execute($tokens, $config, $context) } } - - + + /** @@ -20432,8 +20432,8 @@ public function execute($tokens, $config, $context) } } - - + + /** @@ -20547,8 +20547,8 @@ public function transform($tag, $config, $context) } } - - + + /** @@ -20592,8 +20592,8 @@ public function transform($tag, $config, $context) } } - - + + /** @@ -20631,8 +20631,8 @@ public function toNode() { } } - - + + /** @@ -20700,8 +20700,8 @@ public function toNode() { } } - - + + /** @@ -20716,8 +20716,8 @@ public function toNode() { } } - - + + /** @@ -20741,8 +20741,8 @@ public function toNode() { } } - - + + /** @@ -20752,8 +20752,8 @@ class HTMLPurifier_Token_Start extends HTMLPurifier_Token_Tag { } - - + + /** @@ -20806,8 +20806,8 @@ public function toNode() { } } - - + + class HTMLPurifier_URIFilter_DisableExternal extends HTMLPurifier_URIFilter @@ -20861,8 +20861,8 @@ public function filter(&$uri, $config, $context) } } - - + + class HTMLPurifier_URIFilter_DisableExternalResources extends HTMLPurifier_URIFilter_DisableExternal @@ -20887,8 +20887,8 @@ public function filter(&$uri, $config, $context) } } - - + + class HTMLPurifier_URIFilter_DisableResources extends HTMLPurifier_URIFilter @@ -20910,8 +20910,8 @@ public function filter(&$uri, $config, $context) } } - - + + // It's not clear to me whether or not Punycode means that hostnames @@ -20957,8 +20957,8 @@ public function filter(&$uri, $config, $context) } } - - + + // does not support network paths @@ -21116,8 +21116,8 @@ private function _collapseStack($stack) } } - - + + class HTMLPurifier_URIFilter_Munge extends HTMLPurifier_URIFilter @@ -21232,8 +21232,8 @@ protected function makeReplace($uri, $config, $context) } } - - + + /** @@ -21301,8 +21301,8 @@ public function filter(&$uri, $config, $context) } } - - + + /** @@ -21430,7 +21430,7 @@ public function muteErrorHandler($errno, $errstr) { } } - + /** @@ -21474,8 +21474,8 @@ public function doValidate(&$uri, $config, $context) } } - - + + /** @@ -21533,8 +21533,8 @@ public function doValidate(&$uri, $config, $context) } } - - + + /** @@ -21570,8 +21570,8 @@ public function doValidate(&$uri, $config, $context) } } - - + + /** @@ -21589,8 +21589,8 @@ class HTMLPurifier_URIScheme_https extends HTMLPurifier_URIScheme_http public $secure = true; } - - + + // VERY RELAXED! Shouldn't cause problems, not even Firefox checks if the @@ -21630,8 +21630,8 @@ public function doValidate(&$uri, $config, $context) } } - - + + /** @@ -21666,8 +21666,8 @@ public function doValidate(&$uri, $config, $context) } } - - + + /** @@ -21699,8 +21699,8 @@ public function doValidate(&$uri, $config, $context) } } - - + + /** @@ -21830,8 +21830,8 @@ protected function parseImplementation($var, $type, $allow_null) } } - - + + /** @@ -21869,5 +21869,5 @@ protected function evalExpression($expr) } } - - + + diff --git a/lib/php-smartypants-1.5.1f/smartypants.php b/lib/php-smartypants-1.5.1f/smartypants.php index 0ab2beb..919910a 100755 --- a/lib/php-smartypants-1.5.1f/smartypants.php +++ b/lib/php-smartypants-1.5.1f/smartypants.php @@ -2,7 +2,7 @@ # # SmartyPants - Smart punctuation for web sites # -# PHP SmartyPants +# PHP SmartyPants # Copyright (c) 2004-2013 Michel Fortin # # @@ -18,9 +18,9 @@ # # Default configuration: # -# 1 -> "--" for em-dashes; no en-dash support -# 2 -> "---" for em-dashes; "--" for en-dashes -# 3 -> "--" for em-dashes; "---" for en-dashes +# 1 -> "--" for em-dashes; no en-dash support +# 2 -> "---" for em-dashes; "--" for en-dashes +# 3 -> "--" for em-dashes; "---" for en-dashes # See docs for more configuration options. # define( 'SMARTYPANTS_ATTR', 1 ); @@ -114,7 +114,7 @@ function SmartElipsis($text, $attr = null) { ### Smarty Modifier Interface ### -function smarty_modifier_smartypants($text, $attr = NULL) { +function smarty_modifier_smartypants($text, $attr = null) { return SmartyPants($text, $attr); } @@ -143,7 +143,7 @@ function SmartyPants_Parser($attr = SMARTYPANTS_ATTR) { # 1 : set all # 2 : set all, using old school en- and em- dash shortcuts # 3 : set all, using inverted old school en and em- dash shortcuts - # + # # q : quotes # b : backtick quotes (``double'' only) # B : backtick quotes (``double'' and `single') @@ -210,7 +210,7 @@ function transform($text) { $in_pre = 0; # Keep track of when we're inside
 or  tags.
 
 		$prev_token_last_char = ""; # This is a cheat, used to get some context
-									# for one-character tokens that consist of 
+									# for one-character tokens that consist of
 									# just a quote char. What we do is remember
 									# the last character of the previous text
 									# token, to use as context to curl single-
@@ -285,7 +285,7 @@ function educate($t, $prev_token_last_char) {
 		}
 
 		if ($this->do_stupefy) $t = $this->stupefyEntities($t);
-		
+
 		return $t;
 	}
 
@@ -540,7 +540,7 @@ function tokenizeHTML($str) {
 	#               the second is the actual value.
 	#
 	#
-	#   Regular expression derived from the _tokenize() subroutine in 
+	#   Regular expression derived from the _tokenize() subroutine in
 	#   Brad Choate's MTRegex plugin.
 	#   
 	#
@@ -550,12 +550,12 @@ function tokenizeHTML($str) {
 		$match = '(?s:)|'.	# comment
 				 '(?s:<\?.*?\?>)|'.				# processing instruction
 												# regular tags
-				 '(?:<[/!$]?[-a-zA-Z0-9:]+\b(?>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)'; 
+				 '(?:<[/!$]?[-a-zA-Z0-9:]+\b(?>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)';
 
 		$parts = preg_split("{($match)}", $str, -1, PREG_SPLIT_DELIM_CAPTURE);
 
 		foreach ($parts as $part) {
-			if (++$index % 2 && $part != '') 
+			if (++$index % 2 && $part != '')
 				$tokens[] = array('text', $part);
 			else
 				$tokens[] = array('tag', $part);
@@ -582,14 +582,14 @@ function tokenizeHTML($str) {
 entities. SmartyPants can perform the following transformations:
 
 *	Straight quotes (`"` and `'`) into "curly" quote HTML entities
-*	Backticks-style quotes (` ``like this'' `) into "curly" quote HTML 
+*	Backticks-style quotes (` ``like this'' `) into "curly" quote HTML
 	entities
 *	Dashes (`--` and `---`) into en- and em-dash entities
 *	Three consecutive dots (`...`) into an ellipsis entity
 
-SmartyPants does not modify characters within `
`, ``, ``, 
-`