Esempio n. 1
0
  public ReplayParseContext(
      ContextResultURIConverterFactory uriConverterFactory, URL baseUrl, String datespec) {

    this.uriConverterFactory = uriConverterFactory;
    super.setBaseUrl(baseUrl);
    this.datespec = datespec;
    this.converters = new HashMap<String, ResultURIConverter>();
  }
  protected boolean checkAllowTag(ParseContext context, TagNode tagNode) {
    String tagName = tagNode.getTagName();

    // Check the NOSCRIPT tag, if force-noscript is set,
    // then  skip the NOSCRIPT tags and include contents explicitly
    if (tagName.equals("NOSCRIPT")) {
      String allPolicies = context.getOraclePolicy();

      if ((allPolicies != null) && allPolicies.contains("force-noscript")) {
        return false;
      }
    }

    return true;
  }