Package com.google.caja.plugin.templates

Examples of com.google.caja.plugin.templates.TemplateSanitizer


    // maintain this behavior, regardless of whatever complexity that
    // might entail.

    MessageQueue mq = jobs.getMessageQueue();

    TemplateSanitizer ts = new TemplateSanitizer(htmlSchema, mq);
    for (IhtmlRoot ihtmlRoot : html) {
      ts.sanitize(ihtmlRoot.root);
    }

    TemplateCompiler tc = new TemplateCompiler(
        html, css, js, cssSchema, htmlSchema,
        jobs.getPluginMeta(), jobs.getMessageContext(), mq);
View Full Code Here


    if (null == htmlSchema) { throw new NullPointerException(); }
    this.htmlSchema = htmlSchema;
  }

  public boolean apply(Jobs jobs) {
    TemplateSanitizer s = new TemplateSanitizer(
        htmlSchema, jobs.getMessageQueue());

    boolean valid = true;
    for (JobEnvelope env : jobs.getJobsByType(ContentType.HTML)) {
      if (env.fromCache) { continue; }
      if (!s.sanitize(((Dom) env.job.getRoot()).getValue())) {
        valid = false;
        // Keep going so that we can display error messages for all inputs.
      }
    }
    return valid;
View Full Code Here

    // maintain this behavior, regardless of whatever complexity that
    // might entail.

    MessageQueue mq = jobs.getMessageQueue();

    TemplateSanitizer ts = new TemplateSanitizer(htmlSchema, mq);
    for (IhtmlRoot ihtmlRoot : html) {
      ts.sanitize(ihtmlRoot.root);
    }

    TemplateCompiler tc = new TemplateCompiler(
        html, css, js, cssSchema, htmlSchema,
        jobs.getPluginMeta(), jobs.getMessageContext(), mq);
View Full Code Here

TOP

Related Classes of com.google.caja.plugin.templates.TemplateSanitizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.