HTML Fixup
© 2009, 2012, Martin Rinehart

User Manual

How to:
  1. Open your HTML page in your text editor. Copy/paste it into the "Text to change:" textarea. (Client-side JavaScript: your code stays on your computer.)
  2. Click the Go button (or press ^G).
  3. Copy/paste the text into the W3C markup validator.
  4. Valid?
    • Paste it over the original text.
    • Save.
  5. Invalid?
    • Look for errors that can automatically be fixed. Add more Find`Replace specs. Repeat from 2.
    • Automation not possible? It happens. Sorry. Paste converted text back into editor, then edit manually.
Find`Replace Specs

You will need to edit the Find`Replace specifications to meet the style of the pages you will be processing. The starter set here does these:

Original Converted
=#rrggbb ='#rrggbb'
=+n ='+n' (-n, also)
width=nnxx width='nnxx'
height=nnxx   style='height:nnxx'
<script> <script type='text/JavaScript'>
<style> <style type='text/CSS'>
<code><pre> reverses start/end tags

These will not convert '= #rrggbb'. You could generalize these (=\s*#...) but it may be more time-effective to create different sets matched to the page types you are handling.

Text to change: