r61896 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61895‎ | r61896 | r61897 >
Date:00:03, 3 February 2010
Author:yaron
Status:deferred
Tags:
Comment:
Fixes for handling single- and double-quotes in the form name, when #formlink is called and displayed as a button
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php
@@ -187,6 +187,8 @@
188188 }
189189 }
190190 if ($inLinkType == 'button') {
 191+ $link_url = html_entity_decode($link_url, ENT_QUOTES);
 192+ $link_url = str_replace("'", "\'", $link_url);
191193 $str = "<form><input type=\"button\" value=\"$inLinkStr\" onclick=\"window.location.href='$link_url'\"></form>";
192194 } elseif ($inLinkType == 'post button') {
193195 $str = "<form action=\"$link_url\" method=\"post\"><input type=\"submit\" value=\"$inLinkStr\">$hidden_inputs</form>";

Status & tagging log