DEVELOPER-966 fixes (XSS)

Not sure if there are other places to be doing this, but this seems to fix the area reported in the issue.