I'm looking for a script to replace
<br>
with
<br />
Also looking to change
border=0
into
border="0"
Is this possible to do so that I could pass w3c compliance? Thanks in advance - Dave
I'm looking for a script to replace
<br>
with
<br />
Also looking to change
border=0
into
border="0"
Is this possible to do so that I could pass w3c compliance? Thanks in advance - Dave
To answer your question no, it won't. It's not that javascript isn't capable of replacing and/or fixing malformed tags but by the time your script runs the html has already been parsed.
Im not sure what you looking for but for that kind of changes I use find and replace in the HTML files if you can have access to them. Don't forget to chose the option to replace in all files open or in the solution.
Your changes are not enough complicated to use a regular expression. And it would be a bad idea to run a javascript script every time instead of fixing it once.