mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
Fix encoding of non-breaking spaces if found in ref names
* This partly replicates the fixes in I9435a2d and Ia01f2fd. More to be done in later patches. * Updated html/parsoid test output (which matches the change in the html/php section). Depends-On: I401656265253a429691cc76adc5db5b129cff2cc Change-Id: I7249bd03a7942ff7725a20178a051300b777e3a8
This commit is contained in:
parent
d07d6affd9
commit
0754bc9ffd
|
@ -88,7 +88,7 @@ class ReferencesData {
|
|||
*/
|
||||
private function normalizeKey( string $key ): string {
|
||||
$ret = Sanitizer::escapeIdForAttribute( $key );
|
||||
$ret = preg_replace( '/__+/', '_', $ret );
|
||||
$ret = preg_replace( '/[_\s]+/u', '_', $ret );
|
||||
// FIXME: The extension to the legacy parser does the following too,
|
||||
// but Parsoid hasn't ported it yet and needs investigation of
|
||||
// whether it's still relevant in the Parsoid context.
|
||||
|
|
Loading…
Reference in a new issue