Index: branches/wmf/1.17wmf1/includes/libs/JavaScriptDistiller.php |
— | — | @@ -80,8 +80,8 @@ |
81 | 81 | $parser->add( '/\'([^\'\\\\]*(\\\\.[^\'\\\\]*)*)\'/', '$1' ); |
82 | 82 | $parser->add( '/"([^"\\\\]*(\\\\.[^"\\\\]*)*)"/', '$1' ); |
83 | 83 | // Protect regular expressions |
84 | | - $parser->add( '/[ \\t]+(\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?)/', '$2' ); |
85 | | - $parser->add( '/[^\\w\\$\\/\'"*)\\?:]\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?/', '$1' ); |
| 84 | + $parser->add( '/[ \\t]+((\\/[^\\/\\\\]*(\\\\.[^\\/\\\\]*)*\\/(i|g)*))/', '$1' ); |
| 85 | + $parser->add( '/([^\\w\\$\\/\'"*)\\?:](\\/[^\\/\\\\]*(\\\\.[^\\/\\\\]*)*\\/(i|g)*))/', '$1' ); |
86 | 86 | // Remove comments |
87 | 87 | $parser->add( '/\\/\\*(.|[\\r\\n])*?\\*\\//' ); |
88 | 88 | // Preserve the newline after a C++-style comment -- bug 27046 |
— | — | @@ -162,7 +162,7 @@ |
163 | 163 | foreach ($this->_patterns as $reg) { |
164 | 164 | $regexp .= '(' . substr($reg[self::EXPRESSION], 1, -1) . ')|'; |
165 | 165 | } |
166 | | - $regexp = substr($regexp, 0, -1) . '/'; |
| 166 | + $regexp = substr($regexp, 0, -1) . '/S'; |
167 | 167 | $regexp .= ($this->ignoreCase) ? 'i' : ''; |
168 | 168 | |
169 | 169 | $string = $this->_escape($string, $this->escapeChar); |
Property changes on: branches/wmf/1.17wmf1/includes/libs/JavaScriptDistiller.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
170 | 170 | Merged /branches/new-installer/phase3/includes/libs/JavaScriptDistiller.php:r43664-66004 |
171 | 171 | Merged /branches/wmf-deployment/includes/libs/JavaScriptDistiller.php:r53381,60970 |
172 | 172 | Merged /branches/REL1_15/phase3/includes/libs/JavaScriptDistiller.php:r51646 |
173 | 173 | Merged /branches/wmf/1.16wmf4/includes/libs/JavaScriptDistiller.php:r67177,69199,76243,77266 |
174 | 174 | Merged /branches/sqlite/includes/libs/JavaScriptDistiller.php:r58211-58321 |
175 | 175 | Merged /trunk/phase3/includes/libs/JavaScriptDistiller.php:r81207,82340,82344 |