Escaping HTML within a script block

Hello Action masters!
We’ve just had an issue come into support where code on a page wasn’t passing the W3C’s HTML validation. On closer inspection it appeared that an Action had placed some HTML within a script block. Because of the way the HTML was spliced up in the JS the validator was complaining about orphaned tags and all sorts.
The solution is to escape the end tags of the HTML so that the validator ignores them but they still function within the script.

For example;


should be;


For further information and examples see;
Now go and clean up your code! :slight_smile:

Tim Plumb
Creative Director
Softpress Systems

Follow us on Twitter:
Join us on Facebook:
Looking for a webhost? We love these guys:

actionsdev mailing list
Update your subscriptions at: