Allow for $ characters on front-end editor

In the javascript editor, '$' characters were getting stomped on when
trying to remove backreferences after doing transformations on text
(Bolding, Italicizing, etc.).  This can be fixed by first escaping the
string to be transformed and then unescaping it afterwards.