Fix XSS vulnerability of error pages.

Fixes: #376