In getCategorySortkey: strip tabs and line feeds from the user-supplied category...
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 20 Jan 2011 05:18:39 +0000 (05:18 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 20 Jan 2011 05:18:39 +0000 (05:18 +0000)
includes/Title.php

index fd62d4d..c8fe7b8 100644 (file)
@@ -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;