html_safe bug

Added a .html_safe so that Javascript code output does not get escaped. This has been a bug. (See diff, it's just a one-line change)