Home
last modified time | relevance | path

Searched refs:CssSchema (Results 1 – 5 of 5) sorted by relevance

/external/owasp/sanitizer/src/tests/org/owasp/html/
DCssSchemaTest.java55 assertSame(key, CssSchema.DISALLOWED, CssSchema.DEFAULT.forKey(key)); in testDangerousProperties()
61 for (String propName : CssSchema.DEFAULT_WHITELIST) { in testDangerousTokens()
62 CssSchema.Property property = CssSchema.DEFAULT.forKey(propName); in testDangerousTokens()
80 CssSchema custom = CssSchema.union( in testCustom()
81 CssSchema.DEFAULT, in testCustom()
82 CssSchema.withProperties(Collections.singleton("float")) in testCustom()
84 for (String key : CssSchema.DEFINITIONS.keySet()) { in testCustom()
86 assertSame(key, custom.forKey(key), CssSchema.DEFAULT.forKey(key)); in testCustom()
89 CssSchema.Property cssFloat = custom.forKey("float"); in testCustom()
DStylingPolicyTest.java295 StylingPolicy stylingPolicy = new StylingPolicy(CssSchema.DEFAULT); in assertSanitizedCss()
/external/owasp/sanitizer/src/main/org/owasp/html/
DStylingPolicy.java46 private final CssSchema cssSchema;
48 StylingPolicy(CssSchema cssSchema) { in StylingPolicy()
68 CssSchema.Property cssProperty = CssSchema.DISALLOWED; in sanitizeCssProperties()
69 List<CssSchema.Property> cssProperties = null; in sanitizeCssProperties()
114 : CssSchema.DISALLOWED; in sanitizeCssProperties()
115 if (cssProperty != CssSchema.DISALLOWED) { in sanitizeCssProperties()
129 & (CssSchema.BIT_UNRESERVED_WORD | CssSchema.BIT_URL); in sanitizeCssProperties()
131 if (meaning == CssSchema.BIT_UNRESERVED_WORD in sanitizeCssProperties()
135 } else if (meaning == CssSchema.BIT_URL) { in sanitizeCssProperties()
144 ? CssSchema.BIT_NEGATIVE : CssSchema.BIT_QUANTITY; in sanitizeCssProperties()
[all …]
DCssSchema.java44 public final class CssSchema { class
78 private CssSchema(ImmutableMap<String, Property> properties) { in CssSchema() method in CssSchema
91 public static CssSchema withProperties( in withProperties()
100 return new CssSchema(propertiesBuilder.build()); in withProperties()
109 public static CssSchema union(CssSchema... cssSchemas) { in union()
112 for (CssSchema cssSchema : cssSchemas) { in union()
115 return new CssSchema(ImmutableMap.copyOf(properties)); in union()
901 public static final CssSchema DEFAULT =
902 CssSchema.withProperties(DEFAULT_WHITELIST);
DHtmlPolicyBuilder.java423 allowStyling(CssSchema.DEFAULT); in allowStyling()
431 public HtmlPolicyBuilder allowStyling(CssSchema whitelist) { in allowStyling()