https://bugzilla.wikimedia.org/show_bug.cgi?id=25578

           Summary: We should support XML-valid delimiters for query
                    string parameters
           Product: Wikimedia
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: General/Unknown
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: rkald...@wikimedia.org


I some situations, especially related to forms constructed in wikitext, or in
strict XHTML markup, it is necessary to use escaped ampersands or semicolons to
delimit query string parameters. (See
http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.2 for more info on
this.) Currently the Wikimedia servers only accept non-escaped ampersands as
delimiters for query string parameters. 

Two possible solutions to this are:

1. In our php.ini files, set arg_separator.input = ";&". This will allow people
to use either ampersands or semicolons as delimiters for query string
parameters (as recommended by the w3c).

2. Replace line 50 of WebRequest.php with:

$requestPairs = $_POST + $_GET;
// Accomodate escaped ampersands as query string delimiters
foreach ( $requestPairs as $key => $val) {
    if ( strncmp( $key, 'amp;', 4 ) === 0 ) {
        $goodKey = substr( $key, 4 );
    } else {
        $goodKey = $key;
    }
    $this->data[$goodKey] = $val;
}

This will allow use of query string parameters separated by escaped ampersands.

The impetus for this bug is a problem in the DonationInterface extension
related to forms that live in wikitext (thus forcing ampersands to be escaped).
There are several workarounds available, but I thought I would propose a deeper
solution to see what people thought.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to