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;

document.write("</P>");

should be;

document.write("</P>");

For further information and examples see; http://htmlhelp.com/tools/validator/problems.html
Now go and clean up your code! :slight_smile:
Thanks,
Tim.

Tim Plumb
Creative Director
Softpress Systems

Follow us on Twitter: http://www.softpress.com/tny/064
Join us on Facebook: Redirecting...
Looking for a webhost? We love these guys: Softpress » Web Hosting Partners


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options