-
☆ A M B ☆
- 24,524 Posts
Wouldn’t a non-validating & usually have a space on either side of it? I would think a simple
str_replace(' & ', ' & ', $tring)
would solve 99+% of the validation issues.
Either breaking out all javascript to external files or enclosing it in CDATA tags would also help.
Sharkbait’s code works for this situation where there is space on either side of the ampersand as well.
I wanted to come up with a solution that would work if the ampersand had characters of either side of it, as what happens in some external link URL’s.
However, I’ve just updated all the necessary href URL’s manually within the templates now - I was just looking for a quick fix.
-
☆ A M B ☆
- 24,524 Posts
Thanks for the link Susan - I’ll have a closer look at it later.