Package com.google.template.soy.shared.restricted

Examples of com.google.template.soy.shared.restricted.SoyPrintDirective


    // Traverse the list to (a) record whether we saw any directive that cancels autoescape
    // (including 'noAutoescape' of course) and (b) remove 'noAutoescape' directives.
    boolean shouldCancelAutoescape = false;
    for (PrintDirectiveNode directiveNode : Lists.newArrayList(node.getChildren()) /*copy*/) {
      SoyPrintDirective directive = soyDirectivesMap.get(directiveNode.getName());
      if (directive == null) {
        throw SoySyntaxExceptionUtils.createWithNode(
            "Failed to find SoyPrintDirective with name '" + directiveNode.getName() + "'" +
                " (tag " + node.toSourceString() + ")",
            directiveNode);
      }
      if (directive.shouldCancelAutoescape()) {
        shouldCancelAutoescape = true;
        if (!currTemplateShouldAutoescape && directive instanceof NoAutoescapeDirective) {
          // Remove reundant noAutoescape in autoescape="false" templates; however, keep it for
          // other templates. This ensures filterNoAutoescape gets called for all (even
          // non-contextually) autoescaped templates, as a safeguard against tainted
View Full Code Here

TOP

Related Classes of com.google.template.soy.shared.restricted.SoyPrintDirective

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.