Avoid double escaped expiry time on action=protect
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 27 Jan 2015 19:44:34 +0000 (20:44 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Tue, 27 Jan 2015 19:44:34 +0000 (20:44 +0100)
Xml::option passed the first param to Html::element which escaped the
value, so no htmlspecialchars is needed for $show. The htmlspecialchar
moved closer to output, because the comparision does not need it

Bug: T85864
Change-Id: Ib8b948563095143de686756ceaf46c48cab2c5e0

includes/ProtectionForm.php

index 4eae1ce..f777a37 100644 (file)
@@ -412,11 +412,9 @@ class ProtectionForm {
                                } else {
                                        list( $show, $value ) = explode( ":", $option );
                                }
-                               $show = htmlspecialchars( $show );
-                               $value = htmlspecialchars( $value );
                                $expiryFormOptions .= Xml::option(
                                        $show,
-                                       $value,
+                                       htmlspecialchars( $value ),
                                        $this->mExpirySelection[$action] === $value
                                ) . "\n";
                        }