#428: fix bad pages

Content within pages is not expanded in the index page when they contain invalid HTML.

This fixes the bad HTML, which fixes #428.

@arjclark, please review.