X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fparser%2FParser.php;h=38eb621936dc3165a893d5070193c1f72b8400be;hb=e2a6fe571166160b9caed45f35910a7b9b50d2c0;hp=206ad00ef60466a5d1780c164223ae736c08dfc5;hpb=49a6bc5f9944825ae2be6292fb1ebcc5840ffdcf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 206ad00ef6..38eb621936 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2158,7 +2158,7 @@ class Parser { $might_be_img = true; $text = $m[2]; if ( strpos( $m[1], '%' ) !== false ) { - $m[1] = rawurldecode( $m[1] ); + $m[1] = str_replace( [ '<', '>' ], [ '<', '>' ], rawurldecode( $m[1] ) ); } $trail = ""; } else { # Invalid form; output directly @@ -4364,11 +4364,7 @@ class Parser { $this->startParse( $title, $options, self::OT_WIKI, $clearState ); $this->setUser( $user ); - $pairs = [ - "\r\n" => "\n", - "\r" => "\n", - ]; - $text = str_replace( array_keys( $pairs ), array_values( $pairs ), $text ); + $text = str_replace( [ "\r\n", "\r" ], "\n", $text ); if ( $options->getPreSaveTransform() ) { $text = $this->pstPass2( $text, $user ); }