tags:

views:

17

answers:

1

I'm trying out the PEAR HTML_BBCodeParser script on my home server. For some reason, the script displays backslashes () before single and double quotes in the text after being parsed. I've skimmed through the code, but can't find the place where it does this. Might have missed something--the file is 900 lines long! If anybody knows what function does this, or something to help me find the line of code, it would be highly appreciated. :)

Edit: Of note is that if you replace the single or double quote character with their HTML entity alternative ("/'), they will be parsed as expected.

Edit2: magic_quotes_gpc is turned off.

A: 

As @erenon points out in the comment to your posting it sounds like you have been hit by PHP Magic Quotes rather than a PEAR problem. Having said that, I have not used the BBCode parser, maybe it does something similar as well.

Fredrik
I just changed the magic_quotes_gpc to Off in the php.ini file. Still shows the slashes.
Hussain
@Hussain: Unfortunately, if you have had magic quotes on and used it together with code that correctly escapes things before sending it to the database you will have stored the extra backslash in the database and changing the setting will only matter for new posts. Take a look at what is in the database table. If you see backslashes there, you probably have to write something that cleans the database from the extra backslashes.
Fredrik