Remove inline event handlers from resource template.

This allows us to use a strict CSP on explorer pages, which can mitigate problems like the XSS issue in #541.