validate markup and format. fixes #1426
Merge pull request #1428 from craigh/ticket1426

validate markup and format. fixes #1426