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 = preg_quote( $inReplaceTo, '/' ); |
| 714 | + $inReplaceTo = strtr( $inReplaceTo, array("\\" => "\\\\", '$'=>"\\$" ) ); |
715 | 715 | |
716 | 716 | $result = preg_replace( '/' . $inReplaceFrom . '/u', |
717 | 717 | $inReplaceTo, $inStr, $limit); |