SpecialEditWatchlist: Don't re-escape html option values.
authorTimo Tijhof <ttijhof@wikimedia.org>
Mon, 14 Jan 2013 21:43:02 +0000 (22:43 +0100)
committerTimo Tijhof <ttijhof@wikimedia.org>
Mon, 14 Jan 2013 21:43:02 +0000 (22:43 +0100)
HTMLForm class already escapes them. The values here should be
actual values that can be used directly internally without any
sort of encoding or escaping.

It was working fine because HTMLForm used this array two-way, so
it was also checking against the "wrong" values upon submission.

For the same reason, removing it here will not affect anything.

It does however fix the problem where it is hard to filter these
options in javascript because the values don't match.

Change-Id: Ieb0d4955febaccda2bdca58b316883337831ebfa

includes/specials/SpecialEditWatchlist.php

index eca62f2..ae7657c 100644 (file)
@@ -489,7 +489,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                                $title = Title::makeTitleSafe( $namespace, $dbkey );
                                if ( $this->checkTitle( $title, $namespace, $dbkey ) ) {
                                        $text = $this->buildRemoveLine( $title );
-                                       $fields['TitlesNs'.$namespace]['options'][$text] = htmlspecialchars( $title->getPrefixedText() );
+                                       $fields['TitlesNs'.$namespace]['options'][$text] = $title->getPrefixedText();
                                        $count++;
                                }
                        }