Use inspect when printing the query into a JavaScript call. This should inline "\n"s and fix the second part of http://www.nabble.com/Re%3A-sql-bundle-and-the-keychain--p11521931.html Changed: U trunk/Bundles/SQL.tmbundle/Support/bin/db_browser.rb