Fixed api.php?action=parse&format=xmlfm hitting PCRE limit.
By the way, regexes weren't needed here at all. Change-Id: I41d222a4d60ead3655f7565b6703186abcd223e0
This commit is contained in:
parent
fbfa5c0087
commit
926afc65c3
1 changed files with 2 additions and 1 deletions
|
|
@ -260,7 +260,8 @@ See the <a href='https://www.mediawiki.org/wiki/API'>complete documentation</a>,
|
|||
$text = htmlspecialchars( $text );
|
||||
|
||||
// encode all comments or tags as safe blue strings
|
||||
$text = preg_replace( '/\<(!--.*?--|.*?)\>/', '<span style="color:blue;"><\1></span>', $text );
|
||||
$text = str_replace( '<', '<span style="color:blue;"><', $text );
|
||||
$text = str_replace( '>', '></span>', $text );
|
||||
// identify URLs
|
||||
$protos = wfUrlProtocolsWithoutProtRel();
|
||||
// This regex hacks around bug 13218 (" included in the URL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue