Index: trunk/extensions/ParserFunctions/ParserFunctions_body.php |
— | — | @@ -710,7 +710,7 @@ |
711 | 711 | |
712 | 712 | // Use regex to allow limit and handle UTF-8 correctly. |
713 | 713 | $inReplaceFrom = preg_quote( $inReplaceFrom, '/' ); |
714 | | - $inReplaceTo = strtr( $inReplaceTo, array("\\" => "\\\\", '$'=>"\\$" ) ); |
| 714 | + $inReplaceTo = StringUtils::escapeRegexReplacement( $inReplaceTo ); |
715 | 715 | |
716 | 716 | $result = preg_replace( '/' . $inReplaceFrom . '/u', |
717 | 717 | $inReplaceTo, $inStr, $limit); |