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

--- Comment #3 from Lisa Ridley <lhrid...@gmail.com> 2010-03-03 18:28:00 UTC ---
Revision to the fix above:

function wfUrlencode( $s ) {
    $s = urlencode( $s );
        $s = str_ireplace(
        array( '%3B','%3A','%40','%24','%21','%2A','%28','%29','%2C','%2F' ),
        array(   ';',  ':',  '@',  '$',  '!',  '*',  '(',  ')',  ',',  '/' ),
        $s
    );

    ## check to see if server is running Microsoft IIS 7 or greater; if so
converts colons back to url encoded values
    if(isset($_SERVER['SERVER_SOFTWARE'])) {
        $match = preg_match('|(Microsoft-IIS/7)|', $_SERVER['SERVER_SOFTWARE'],
$a);
        if($match > 0) {
                if(!(strpos($s, '%')===false)) {
                    $s = str_ireplace(array(':'), array('%3A'), $s);
            }
        }
    }
    return $s;
}

-- 
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