anarchoi Posted February 27, 2008 Share Posted February 27, 2008 Ok here is my situation: I coded a script for vBulletin that displays the last topics on my forum. When the mouse is over the link, I use JavaScript to display the post's text ( onmouseover="Tip('$var')" ) The problem is that as soon as the post text contains BBCode it mess all the page up. I'm suspecting this is due of double quotes in BBCode ( i.e. [C0L0R=Red][/C0L0R] ) how can i take it out of $var ? thanks Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted February 27, 2008 Share Posted February 27, 2008 you should process out the BBcode before displaying it usually (otherwise how is html going to render it?) To get around it addslashes might do Quote Link to comment Share on other sites More sharing options...
Bauer418 Posted February 27, 2008 Share Posted February 27, 2008 Rather than stripping out the double quotes, consider running: $var = htmlentities($var, ENT_QUOTES); Which will convert double quotes to " to and single quotes to ' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.