Class ChartTagBodySanitizer

java.lang.Object
com.jalios.jcms.chart.ChartTagBodySanitizer

public final class ChartTagBodySanitizer extends Object
Converts the legacy JavaScript object literal accepted in a chart tag body to strict JSON without executing code.
  • Method Details

    • sanitize

      public static String sanitize(String tagBody)
      Converts a chart tag body to strict JSON. Invalid or executable content is rejected.
      Parameters:
      tagBody - the chart tag body
      Returns:
      a strict JSON object, or {} when the body is invalid