Skip to content Skip to sidebar Skip to footer

Jquery Ajax Response Removes The + Character

Update: It looks like the problem is when I'm reading the value from the html to begin with. This is the markup:

Solution 1:

Did you try HTML encoding the response? I use these functions in my javascript to encode/decode.

functionHtmlEncode(value)
{
    return $('<div/>').text(value).html();
}

functionHtmlDecode(value)
{
    return $('<div/>').html(value).text();
}

Solution 2:

I recommend trying to escape your plus + as &#43; and see if that solves your problem. If it does, its a entity escape problem.

Post a Comment for "Jquery Ajax Response Removes The + Character"