Will some of my JavaScript has table, div, etc. tags in it. The closing tags miss up XHTML validation. The script in question is a news scroller.
But I figured it out. It was too simple, cant believe I didn't figure it out earlier.
So if I put {} it means exactly what is in between {}, right? I think some of my interpretations are wrong, I got to un-teach myself of these bad coding habits, lol.
My new code just in case someone else is having the same problems.
Code: Select all
return preg_replace('{</}','<\/', $content);
It will replace a </tag> with <\/tag>, perfect for JavaScript.