Patch some XSS vulnerabilites

Signed-off-by: Mikko Koponen <mikko.koponen@reaktor.fi>