Fomafix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393381 )
Change subject: [WIP] Strip soft hyphens (U+00AD) from title ...................................................................... [WIP] Strip soft hyphens (U+00AD) from title Bug: T145605 Change-Id: Ie13626c433cdb460dbf00b3bba28d1bb5a7b6d6a --- M includes/title/MediaWikiTitleCodec.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/81/393381/1 diff --git a/includes/title/MediaWikiTitleCodec.php b/includes/title/MediaWikiTitleCodec.php index efc0fd4..040a088 100644 --- a/includes/title/MediaWikiTitleCodec.php +++ b/includes/title/MediaWikiTitleCodec.php @@ -276,10 +276,10 @@ 'user_case_dbkey' => $dbkey, ]; - # Strip Unicode bidi override characters. + # Strip soft hyphen (U+00AD) and Unicode bidi override characters. # Sometimes they slip into cut-n-pasted page titles, where the # override chars get included in list displays. - $dbkey = preg_replace( '/\xE2\x80[\x8E\x8F\xAA-\xAE]/S', '', $dbkey ); + $dbkey = preg_replace( '/\xC2\xAD|\xE2\x80[\x8E\x8F\xAA-\xAE]/S', '', $dbkey ); # Clean up whitespace # Note: use of the /u option on preg_replace here will cause -- To view, visit https://gerrit.wikimedia.org/r/393381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie13626c433cdb460dbf00b3bba28d1bb5a7b6d6a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Fomafix <foma...@googlemail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits