GitHub user JoshRosen opened a pull request: https://github.com/apache/spark/pull/12995
[SPARK-15209] Fix display of job descriptions with single quotes in web UI timeline ## What changes were proposed in this pull request? This patch fixes an escaping bug in the Web UI's event timeline that caused Javascript errors when displaying timeline entries whose descriptions include single quotes. The original bug can be reproduced by running ```scala sc.setJobDescription("double quote: \" ") sc.parallelize(1 to 10).count() sc.setJobDescription("single quote: ' ") sc.parallelize(1 to 10).count() ``` and then browsing to the driver UI. Previously, this resulted in an "Uncaught SyntaxError" because the single quote from the description was not escaped and ended up closing a Javascript string literal too early. The fix implemented here is to change the relevant Javascript to define its string literals using double-quotes. Our escaping logic already properly escapes double quotes in the description, so this is safe to do. ## How was this patch tested? Tested manually in `spark-shell` using the above example. /cc @sarutak for review. You can merge this pull request into a Git repository by running: $ git pull https://github.com/JoshRosen/spark SPARK-15209 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/12995.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #12995 ---- commit ea9fd475d29989b977bca42fd87bb7545e3ffbb6 Author: Josh Rosen <joshro...@databricks.com> Date: 2016-05-09T03:28:04Z Fix SPARK-15209 ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org