Index: trunk/phase3/maintenance/parserTests.inc |
— | — | @@ -304,10 +304,10 @@ |
305 | 305 | /** |
306 | 306 | * Get a Parser object |
307 | 307 | */ |
308 | | - function getParser() { |
| 308 | + function getParser($preprocessor = null) { |
309 | 309 | global $wgParserConf; |
310 | 310 | $class = $wgParserConf['class']; |
311 | | - $parser = new $class( $wgParserConf ); |
| 311 | + $parser = new $class( array( 'preprocessorClass'=>$preprocessor ) + $wgParserConf ); |
312 | 312 | foreach( $this->hooks as $tag => $callback ) { |
313 | 313 | $parser->setHook( $tag, $callback ); |
314 | 314 | } |
— | — | @@ -352,7 +352,8 @@ |
353 | 353 | |
354 | 354 | $noxml = isset( $opts['noxml'] ); |
355 | 355 | $local = isset( $opts['local'] ); |
356 | | - $parser = $this->getParser(); |
| 356 | + $preprocessor = @$opts['preprocessor']; |
| 357 | + $parser = $this->getParser( $preprocessor ); |
357 | 358 | $title = Title::newFromText( $titleText ); |
358 | 359 | |
359 | 360 | $matches = array(); |
Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -865,18 +865,6 @@ |
866 | 866 | !!end |
867 | 867 | |
868 | 868 | !! test |
869 | | -External links: invalid character |
870 | | -Fixme: the missing char seems to have gone missing |
871 | | -!! options |
872 | | -disabled |
873 | | -!! input |
874 | | -[http://www.example.com test] |
875 | | -!! result |
876 | | -<p>[<a href="http://www.example.com" class="external free" rel="nofollow">http://www.example.com</a> test] |
877 | | -</p> |
878 | | -!! end |
879 | | - |
880 | | -!! test |
881 | 869 | External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081) |
882 | 870 | !! input |
883 | 871 | [http://www.example.com test] |
Index: trunk/phase3/maintenance/ExtraParserTests.txt |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/phase3/maintenance/ExtraParserTests.txt |
___________________________________________________________________ |
Name: svn:mime-type |
884 | 872 | + application/octet-stream |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | $this->mDefaultStripList = $this->mStripList = array(); |
131 | 131 | $this->mUrlProtocols = wfUrlProtocols(); |
132 | 132 | $this->mExtLinkBracketedRegex = '/\[(\b(' . wfUrlProtocols() . ')'. |
133 | | - '[^][<>"\\x00-\\x20\\x7F]+) *([^\]\\x0a\\x0d]*?)\]/S'; |
| 133 | + '[^][<>"\\x00-\\x20\\x7F]+) *([^\]\\x00-\\x08\\x0a-\\x1F]*?)\]/S'; |
134 | 134 | $this->mVarCache = array(); |
135 | 135 | if ( isset( $conf['preprocessorClass'] ) ) { |
136 | 136 | $this->mPreprocessorClass = $conf['preprocessorClass']; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -4015,6 +4015,7 @@ |
4016 | 4016 | */ |
4017 | 4017 | $wgParserTestFiles = array( |
4018 | 4018 | "$IP/maintenance/parserTests.txt", |
| 4019 | + "$IP/maintenance/ExtraParserTests.txt" |
4019 | 4020 | ); |
4020 | 4021 | |
4021 | 4022 | /** |