Fixes major security exploit regarding JavaScript injection.
Merge pull request #2819 from YotaXP/fix-1957

Fixes major security exploit regarding JavaScript injection.