Closes #1162: Problems with codeviewer

 - added String#encode in codeviewer.rjs