You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by srowen <gi...@git.apache.org> on 2017/05/02 08:56:19 UTC

[GitHub] spark pull request #17686: [SPARK-20393][Webu UI] Strengthen Spark to preven...

Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17686#discussion_r114274480
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/UIUtils.scala ---
    @@ -27,13 +27,16 @@ import scala.xml.transform.{RewriteRule, RuleTransformer}
     
     import org.apache.spark.internal.Logging
     import org.apache.spark.ui.scope.RDDOperationGraph
    +import org.apache.commons.lang3.StringEscapeUtils
     
     /** Utility functions for generating XML pages with spark content. */
     private[spark] object UIUtils extends Logging {
       val TABLE_CLASS_NOT_STRIPED = "table table-bordered table-condensed"
       val TABLE_CLASS_STRIPED = TABLE_CLASS_NOT_STRIPED + " table-striped"
       val TABLE_CLASS_STRIPED_SORTABLE = TABLE_CLASS_STRIPED + " sortable"
     
    +  private val NEWLINE_AND_SINGLE_QUOTE_REGEX = "(\r\n|\n|\r|%0D%0A|%0A|%0D|'|%27)"
    --- End diff --
    
    I still think it's worth making this a regex object if you're going to bother, but otherwise LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org