Prevent XSS attacks introduced by 213a24a1

Thanks to @tomvangoethem for the report!