This is a quick fix for the main symptom of the Chrome bug that results in
users being redirected to Special:BadTitle after section editing. We'll
need to discuss a more permanent solution.
Bug: T216029
Change-Id: I4b2d42ebc74031df86bc52310da71819da11c1ae
* (T199474) Fix typo in rebuildrecentchanges.php resulting in rogue flags.
* (T218608) Fix an issue that prevents Extension:OAuth working when
$wgBlockDisablesLogin is true.
+* (T216029) Chrome redirects to Special:BadTitle after editing a section with
+ a non-Latin name on a page with non-Latin characters in title.
== MediaWiki 1.31.1 ==
return $wgParser->guessLegacySectionNameFromWikiText( $text );
}
// Meanwhile, real browsers get real anchors
- return $wgParser->guessSectionNameFromWikiText( $text );
+ $name = $wgParser->guessSectionNameFromWikiText( $text );
+ // With one little caveat: per T216029, fragments in HTTP redirects need to be urlencoded,
+ // otherwise Chrome double-escapes the rest of the URL.
+ return '#' . urlencode( mb_substr( $name, 1 ) );
}
/**