:: Forum >>

Bug report: missing encodeURIComponent


Attribute name will rarely have special characters, but you never know. Please add encodeURIComponent function for name as well.

--- request.js ---
var i, j, name, value, data = "", params = this._parameters.split(" ");
for (i=1; i<params.length; i++){
    name = params[i];
    value = this["_" + name + "Parameter"];
    if (typeof value == "function") { value = value(); }
    if (typeof value == "object" && value.constructor == Array){
        for (j=0; j<value.length; j++){
            data += encodeURIComponent(name) + "=" + encodeURIComponent(value[j]) + "&";
        }
    }
    else {
        data += encodeURIComponent(name) + "=" + encodeURIComponent(value) + "&";
    }
}
Sudhaker Raj
Friday, April 7, 2006
Yes, agree, thats a good idea.
Alex (ActiveWidgets)
Friday, April 7, 2006

This topic is archived.


Back to support forum

Forum search