Package com.google.caja.config

Examples of com.google.caja.config.WhiteList


  private static Pair<CssSchema, List<Message>> defaultSchema;
  public static CssSchema getDefaultCss21Schema(MessageQueue mq) {
    if (defaultSchema == null) {
      SimpleMessageQueue cacheMq = new SimpleMessageQueue();
      WhiteList propDefs, fnDefs;
      try {
        propDefs = ConfigUtil.loadWhiteListFromJson(
            defaultPropWhitelistURL, ConfigUtil.RESOURCE_RESOLVER, cacheMq);
        fnDefs = ConfigUtil.loadWhiteListFromJson(
            defaultFnWhitelistURL, ConfigUtil.RESOURCE_RESOLVER, cacheMq);
View Full Code Here


              Namespaces.HTML_NAMESPACE_URI, BODY_CLASS.localName);
          if (classAttr != null) {
            el.removeAttributeNode(classAttr);
            String identifiers = classAttr.getValue().trim();
            if (!"".equals(identifiers)) {
              WhiteList wl = WhiteList.Factory.empty();
              HtmlAttributeRewriter rw = new HtmlAttributeRewriter(
                  jobs.getPluginMeta(), new CssSchema(wl, wl),
                  htmlSchema, Maps.<Attr, EmbeddedContent>newHashMap(),
                  jobs.getMessageQueue());
              HtmlAttributeRewriter.SanitizedAttr sanitized
View Full Code Here

      mq.addMessage(MessageType.IO_ERROR, src);
    } catch (ParseException ex) {
      ex.toMessageQueue(mq);
    }
    // Return a Null instance if unable to load.
    return new WhiteList() {
        public Set<String> allowedItems() {
          return Collections.<String>emptySet();
        }
        public Map<String, TypeDefinition> typeDefinitions() {
          return Collections.<String, TypeDefinition>emptyMap();
View Full Code Here

      SimpleMessageQueue cacheMq = new SimpleMessageQueue();
      URI fnSrc = URI.create(
              "resource:///com/google/caja/lang/css/css-extensions-fns.json"),
          propSrc = URI.create(
              "resource:///com/google/caja/lang/css/css-extensions.json");
      WhiteList propDefs, fnDefs;
      try {
        propDefs = ConfigUtil.loadWhiteListFromJson(
            propSrc, ConfigUtil.RESOURCE_RESOLVER, cacheMq);
        fnDefs = ConfigUtil.loadWhiteListFromJson(
            fnSrc, ConfigUtil.RESOURCE_RESOLVER, cacheMq);
View Full Code Here

TOP

Related Classes of com.google.caja.config.WhiteList

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.