proto: encode stack in HTML for default error handler

fixes #1024