From: Tim Starling Date: Thu, 20 Jan 2011 05:18:39 +0000 (+0000) Subject: In getCategorySortkey: strip tabs and line feeds from the user-supplied category... X-Git-Tag: 1.31.0-rc.0~32463 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=e00465ab66d4d59d1e33835c9d2737edb49d019a;p=lhc%2Fweb%2Fwiklou.git In getCategorySortkey: strip tabs and line feeds from the user-supplied category sort key, to avoid conflicts with our usage of LF. In UCA, tab is the only character that can sort above LF. --- diff --git a/includes/Title.php b/includes/Title.php index fd62d4dcc1..c8fe7b8d27 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4152,6 +4152,7 @@ class Title { # Separate with a null byte, so the unprefixed part is only used as # a tiebreaker when two pages have the exact same prefix -- null # sorts before everything else (hopefully). + $prefix = strtr( $prefix, "\n\t", ' ' ); return "$prefix\n$unprefixed"; } return $unprefixed;