The fact that in 2016 a line like
if (string.indexOf("<script") > -1 || !renderAsHTML) { string = dom.escapeString(string); }
still exists makes me both amused and sad at the same time.
Seriously, what is this trying to achieve?
On the original OP; I remember htmlSnippet having an attribute that allows you to choose between html and javascript content. Is this setting gone?