/ Published in: Ruby
The escape_javascript funtion is taken from Rails (http://rails.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html#M000633). Most of the work on this was done by pnomolos and n00ge on the E Text Editor forums.
URL: http://www.e-texteditor.com/forum/viewtopic.php?p=6358