Fix "(invalid)" markup in summary view

The markup of "(invalid)" is rendered as plain text due to the fact that
they are produced in a ERB tag without the use of `String#html_safe` or
the `raw` method.