程序包 com.sh.json.util

类 WebHijackPreventionStrategy

java.lang.Object
com.sh.json.util.WebHijackPreventionStrategy

public abstract class WebHijackPreventionStrategy extends Object
Defines base implementations for preventing WebHijack in AJAX applications. The default implementations are:
  • COMMENTS - wraps the string with /* *\/
  • INFINITE_LOOP - prepends "while(1);"
  • 字段详细资料

  • 构造器详细资料

    • WebHijackPreventionStrategy

      public WebHijackPreventionStrategy()
  • 方法详细资料

    • protect

      public abstract String protect(String str)
      Transforms the input with the desired strategy.
      参数:
      str - a json string
      返回:
      String - the transformed json string