Fixes a potential cross site scripting (XSS) issue

"Clean" version of issue #15 with a single commit.