@@ -975,10 +975,10 @@ discard block |
||
| 975 | 975 | */ |
| 976 | 976 | public function getFunctionName() |
| 977 | 977 | { |
| 978 | - // function name is used as base for caching, so it must be unique for |
|
| 979 | - // every combination of settings that changes code in compiled template |
|
| 978 | + // function name is used as base for caching, so it must be unique for |
|
| 979 | + // every combination of settings that changes code in compiled template |
|
| 980 | 980 | |
| 981 | - if (!$this->_functionName) { |
|
| 981 | + if (!$this->_functionName) { |
|
| 982 | 982 | |
| 983 | 983 | // just to make tempalte name recognizable |
| 984 | 984 | $basename = preg_replace('/\.[a-z]{3,5}$/', '', basename($this->_source->getRealPath() ?? '')); |
@@ -998,7 +998,7 @@ discard block |
||
| 998 | 998 | $hash = strtr(rtrim(base64_encode($hash),"="),"+/=","_A_"); |
| 999 | 999 | |
| 1000 | 1000 | $this->_functionName = $this->getFunctionNamePrefix($this->_source->getLastModifiedTime()) . |
| 1001 | - $basename . '__' . $hash; |
|
| 1001 | + $basename . '__' . $hash; |
|
| 1002 | 1002 | } |
| 1003 | 1003 | return $this->_functionName; |
| 1004 | 1004 | } |
@@ -60,23 +60,23 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | static $state_names = array( |
| 63 | - self::ST_ROOT => 'root node', |
|
| 64 | - self::ST_TEXT => 'text', |
|
| 65 | - self::ST_LT => 'start of tag', |
|
| 66 | - self::ST_TAG_NAME => 'tag name', |
|
| 67 | - self::ST_TAG_CLOSE => 'closing tag', |
|
| 68 | - self::ST_TAG_SINGLE => 'self-closing tag', |
|
| 69 | - self::ST_TAG_ATTRIBUTES => 'tag', |
|
| 70 | - self::ST_TAG_BETWEEN_ATTRIBUTE => 'tag attributes', |
|
| 71 | - self::ST_CDATA => 'CDATA', |
|
| 72 | - self::ST_COMMENT => 'comment', |
|
| 73 | - self::ST_DOCTYPE => 'doctype', |
|
| 74 | - self::ST_XMLDEC => 'XML declaration', |
|
| 75 | - self::ST_PREPROC => 'preprocessor directive', |
|
| 76 | - self::ST_ATTR_KEY => 'attribute name', |
|
| 77 | - self::ST_ATTR_EQ => 'attribute value', |
|
| 78 | - self::ST_ATTR_QUOTE => 'quoted attribute value', |
|
| 79 | - self::ST_ATTR_VALUE => 'unquoted attribute value', |
|
| 63 | + self::ST_ROOT => 'root node', |
|
| 64 | + self::ST_TEXT => 'text', |
|
| 65 | + self::ST_LT => 'start of tag', |
|
| 66 | + self::ST_TAG_NAME => 'tag name', |
|
| 67 | + self::ST_TAG_CLOSE => 'closing tag', |
|
| 68 | + self::ST_TAG_SINGLE => 'self-closing tag', |
|
| 69 | + self::ST_TAG_ATTRIBUTES => 'tag', |
|
| 70 | + self::ST_TAG_BETWEEN_ATTRIBUTE => 'tag attributes', |
|
| 71 | + self::ST_CDATA => 'CDATA', |
|
| 72 | + self::ST_COMMENT => 'comment', |
|
| 73 | + self::ST_DOCTYPE => 'doctype', |
|
| 74 | + self::ST_XMLDEC => 'XML declaration', |
|
| 75 | + self::ST_PREPROC => 'preprocessor directive', |
|
| 76 | + self::ST_ATTR_KEY => 'attribute name', |
|
| 77 | + self::ST_ATTR_EQ => 'attribute value', |
|
| 78 | + self::ST_ATTR_QUOTE => 'quoted attribute value', |
|
| 79 | + self::ST_ATTR_VALUE => 'unquoted attribute value', |
|
| 80 | 80 | ); |
| 81 | 81 | |
| 82 | 82 | private $input_encoding; |
@@ -381,15 +381,15 @@ discard block |
||
| 381 | 381 | |
| 382 | 382 | // http://www.w3.org/International/questions/qa-forms-utf-8 |
| 383 | 383 | $match = '[\x09\x0A\x0D\x20-\x7F]' // ASCII |
| 384 | - . '|[\xC2-\xDF][\x80-\xBF]' // non-overlong 2-byte |
|
| 385 | - . '|\xE0[\xA0-\xBF][\x80-\xBF]' // excluding overlongs |
|
| 386 | - . '|[\xE1-\xEC\xEE\xEE][\x80-\xBF]{2}' // straight 3-byte (exclude FFFE and FFFF) |
|
| 387 | - . '|\xEF[\x80-\xBE][\x80-\xBF]' // straight 3-byte |
|
| 388 | - . '|\xEF\xBF[\x80-\xBD]' // straight 3-byte |
|
| 389 | - . '|\xED[\x80-\x9F][\x80-\xBF]' // excluding surrogates |
|
| 390 | - . '|\xF0[\x90-\xBF][\x80-\xBF]{2}' // planes 1-3 |
|
| 391 | - . '|[\xF1-\xF3][\x80-\xBF]{3}' // planes 4-15 |
|
| 392 | - . '|\xF4[\x80-\x8F][\x80-\xBF]{2}'; // plane 16 |
|
| 384 | + . '|[\xC2-\xDF][\x80-\xBF]' // non-overlong 2-byte |
|
| 385 | + . '|\xE0[\xA0-\xBF][\x80-\xBF]' // excluding overlongs |
|
| 386 | + . '|[\xE1-\xEC\xEE\xEE][\x80-\xBF]{2}' // straight 3-byte (exclude FFFE and FFFF) |
|
| 387 | + . '|\xEF[\x80-\xBE][\x80-\xBF]' // straight 3-byte |
|
| 388 | + . '|\xEF\xBF[\x80-\xBD]' // straight 3-byte |
|
| 389 | + . '|\xED[\x80-\x9F][\x80-\xBF]' // excluding surrogates |
|
| 390 | + . '|\xF0[\x90-\xBF][\x80-\xBF]{2}' // planes 1-3 |
|
| 391 | + . '|[\xF1-\xF3][\x80-\xBF]{3}' // planes 4-15 |
|
| 392 | + . '|\xF4[\x80-\x8F][\x80-\xBF]{2}'; // plane 16 |
|
| 393 | 393 | |
| 394 | 394 | if (!preg_match('/^(?:(?>'.$match.'))+$/s',$str)) { |
| 395 | 395 | $res = preg_split('/((?>'.$match.')+)/s',$str,0,PREG_SPLIT_DELIM_CAPTURE); |