Page MenuHomePhabricator

on the form input: double urlencode problem of title
Closed, ResolvedPublic

Description

Author: araste

Description:
I am using SemanticForms 1.3.3 on my mediawiki 1.13.1, and the language of my site is Korean.

I made a template creation form and try to add a page with that form, but there was a problem. In the Korean wiki, the name of the namespace 'Special' is '특수기능'. The page title '특수기능:AddPage' goes into 'title' field, url-encoded. So while running 'GET' method into the page, title field which is already url-encoded is encoded again, and it makes trouble. : 'Page not found' error occurs.

This patch should be applied to fix this problem.

<pre>

Index: includes/SF_ParserFunctions.php

  • includes/SF_ParserFunctions.php (revision 810)

+++ includes/SF_ParserFunctions.php (working copy)
@@ -154,7 +154,7 @@

// (i.e., it's in the default URL style), add in the title as a
// hidden value
if (($pos = strpos($ap_url, "title=")) > -1) {
  • $str .= ' <input type="hidden" name="title" value="' . substr($ap_url, $pos + 6) . '">' . "\n";

+ $str .= ' <input type="hidden" name="title" value="' . urldecode(substr($ap_url, $pos + 6)) . '">' . "\n";

}
if ($inFormName == '') {
        $str .= sffFormDropdownHTML();

</pre>


Version: unspecified
Severity: major

Details

Reference
bz15924

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:21 PM
bzimport set Reference to bz15924.

Thanks for the patch; this was fixed in version 1.3.4.