Hello, i tried that, but htmlentities("A+") echos "A+", so it does not
convert it.

On Fri, Mar 20, 2009 at 4:06 PM, Martijn Houtman
<[email protected]> wrote:
>
>
> On Mar 20, 2009, at 3:59 PM, Alexandre Plennevaux wrote:
>
>> i'm doing an ajax call via the load() function. The fetched string
>> contains the "+" sign, and it gets removed in the resulting html. Why
>> is that?
>> note: i'm using php. The only way i found to have the string shown, is
>> to urlencode() it. But i don't want to urlencode() entire texts that
>> should remain human-readable.
>> I'm sure there is an obvious solution, however i can't seem to find it.
>
> try htmlentities() rather than urlencode() (PHP). I believe the plus sign is
> interpreted as a space. Please do note that this escapes _all_ HTML code, so
> it will not be interpreted as HTML (if it contains any).
>
> Regards,
> --
> Martijn.
>

Reply via email to