/packages/apps/UnifiedEmail/tests/src/com/android/mail/utils/ |
AdvancedHtmlSanitizerTest.java | 12 sanitize("<html>\n" + 49 sanitize("'';!--\"<XSS>=&{()}", "'';!--"=&{()}"); 50 sanitize("<img src=javascript:alert(String.fromCharCode(88,83,83))>", ""); 51 sanitize("\\\";alert('XSS');//", "\\";alert('XSS');//"); 52 sanitize("<br size=\"&{alert('XSS')}\">", "<br />"); 53 sanitize("<xss style=\"xss:expression(alert('XSS'))\">", ""); 54 sanitize("<xss style=\"behavior: url(xss.htc);\">", ""); 55 sanitize("¼script¾alert(¢XSS¢)¼/script¾", "¼script¾alert(¢XSS¢)¼/script¾"); 56 sanitize("<xml><i><b><img src=\"javas<!-- -->cript:alert('XSS')\"></b></i></xml>", 58 sanitize("<xml src=\"xsstest.xml\" id=I></xml>", "") 534 private void sanitize(String dirtyHTML, String expectedHTML) { method in class:AdvancedHtmlSanitizerTest [all...] |
BasicHtmlSanitizerTest.java | 13 sanitize("<div dir=\"ltr\">something</div>", "<div dir=\"ltr\">something</div>"); 14 sanitize("<div dir=\"rtl\">something</div>", "<div dir=\"rtl\">something</div>"); 15 sanitize("<div dir=\"LTR\">something</div>", "<div dir=\"ltr\">something</div>"); 16 sanitize("<div dir=\"RTL\">something</div>", "<div dir=\"rtl\">something</div>"); 17 sanitize("<div dir=\"blah\">something</div>", "<div>something</div>"); 22 sanitize("<a coords=\"something\"></a>", "<a coords=\"something\"></a>"); 23 sanitize("<a href=\"http://www.here.com\"></a>", "<a href=\"http://www.here.com\"></a>"); 24 sanitize("<a href=\"https://www.here.com\"></a>", "<a href=\"https://www.here.com\"></a>"); 25 sanitize("<a name=\"something\"></a>", "<a name=\"something\"></a>"); 26 sanitize("<a shape=\"something\"></a>", "<a shape=\"something\"></a>") 854 sanitize(attack, defend); method 1074 private void sanitize(String dirtyHTML, String expectedHTML) { method in class:BasicHtmlSanitizerTest [all...] |
QuotedHtmlSanitizerTest.java | 17 sanitize("<div class=\"garbage\"></div>", "<div></div>"); 24 sanitize("<div class=\"gmail_quote\"></div>", "<div class=\"elided-text\"></div>"); 31 sanitize("<div class=\"yahoo_quoted\"></div>", "<div class=\"elided-text\"></div>"); 38 sanitize("<div id=\"AOLMsgPart_1_59da800c-ba5d-45c5-9ff7-29a8264a5bd9\"></div>", 40 sanitize("<div id=\"AOLMsgPart_1_b916b4c7-3047-43a9-b24d-83b7ffd2b9b7\"></div>", 44 private void sanitize(String dirtyHTML, String expectedHTML) { method in class:QuotedHtmlSanitizerTest
|
/external/owasp/sanitizer/src/tests/org/owasp/html/ |
HtmlSanitizerTest.java | 42 assertEquals("", sanitize("")); 43 assertEquals("", sanitize(null)); 48 assertEquals("hello world", sanitize("hello world")); 53 assertEquals("<hello world>", sanitize("<hello world>")); 59 sanitize("<b>hello <i>world</i></b>")); 65 sanitize("<b>hello <bogus></bogus><i>world</i></b>")); 71 sanitize("<b>hello <i>world</i>" 79 sanitize("<b>hello <i onclick=\"takeOverWorld(this)\">world</i></b>")); 85 sanitize( 92 sanitize("<b id=\"foo\" / -->hello <i>world<</i></b>")) 343 private static String sanitize(@Nullable String html) throws Exception { method in class:HtmlSanitizerTest [all...] |
SanitizersTest.java | 39 assertEquals("", Sanitizers.FORMATTING.sanitize(null)); 40 assertEquals("", Sanitizers.FORMATTING.sanitize("")); 43 Sanitizers.FORMATTING.sanitize("Hello, World!")); 46 Sanitizers.FORMATTING.sanitize("Hello, <b>World</b>!")); 49 Sanitizers.FORMATTING.sanitize( 55 assertEquals("", Sanitizers.BLOCKS.sanitize(null)); 58 Sanitizers.BLOCKS.sanitize("Hello, World!")); 61 Sanitizers.BLOCKS.sanitize("Hello, <b>World</b>!")); 64 Sanitizers.BLOCKS.sanitize( 76 assertEquals("", f.sanitize(null)) [all...] |
AntiSamyTest.java | 92 private static String sanitize(String html) {
95 HtmlSanitizer.sanitize(html, makePolicy(sb));
177 sanitize(html);
241 if (sanitize(s).length() != 0) {
245 if (sanitize(s).length() != 0) {
249 sanitize("<IMG SRC=javascript:alert('XSS')>");
250 sanitize("<IMG SRC=javascript:alert('XSS')>");
392 sanitize(testStr);
393 sanitize(testStr);
399 sanitize("<a . href=\"http://www.test.com\">")); [all...] |
ExamplesTest.java | 61 // Invoke with no arguments to sanitize empty input stream to output. 82 String sanitized = EbayPolicyExample.POLICY_DEFINITION.sanitize(input); 89 String sanitized = EbayPolicyExample.POLICY_DEFINITION.sanitize(input); 96 String sanitized = EbayPolicyExample.POLICY_DEFINITION.sanitize(input);
|
Benchmark.java | 70 n += sanitize(html).length(); 93 n += sanitize(html).length(); 118 "Full sanitize custom : %12d", (t3 - t2))); 122 "Full sanitize w/ PB : %12d", (t5 - t4))); 132 private static String sanitize(String html) throws Exception { method in class:Benchmark 143 HtmlSanitizer.sanitize(html, new HtmlSanitizer.Policy() { 202 HtmlSanitizer.sanitize(html, policyBuilder.build(renderer));
|
/external/harfbuzz_ng/src/ |
hb-ot-layout-jstf-table.hh | 57 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::JstfPriority 61 shrinkageEnableGSUB.sanitize (c, this) && 62 shrinkageDisableGSUB.sanitize (c, this) && 63 shrinkageEnableGPOS.sanitize (c, this) && 64 shrinkageDisableGPOS.sanitize (c, this) && 65 shrinkageJstfMax.sanitize (c, this) && 66 extensionEnableGSUB.sanitize (c, this) && 67 extensionDisableGSUB.sanitize (c, this) && 68 extensionEnableGPOS.sanitize (c, this) && 69 extensionDisableGPOS.sanitize (c, this) & 126 inline bool sanitize (hb_sanitize_context_t *c, function in struct:OT::JstfLangSys 167 inline bool sanitize (hb_sanitize_context_t *c, function in struct:OT::JstfScript 212 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::JSTF [all...] |
hb-ot-layout-gdef-table.hh | 74 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::AttachList 77 return_trace (coverage.sanitize (c, this) && attachPoint.sanitize (c, this)); 105 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CaretValueFormat1 132 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CaretValueFormat2 156 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CaretValueFormat3 159 return_trace (c->check_struct (this) && deviceTable.sanitize (c, this)); 185 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CaretValue 188 if (!u.format.sanitize (c)) return_trace (false); 190 case 1: return_trace (u.format1.sanitize (c)) 227 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::LigGlyph 262 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::LigCaretList 285 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MarkGlyphSetsFormat1 310 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MarkGlyphSets 376 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::GDEF [all...] |
hb-ot-glyf-table.hh | 47 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::loca 73 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::glyf
|
hb-open-file-private.hh | 56 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::TableRecord 106 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::OffsetTable 135 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::TTCHeaderVersion1 138 return_trace (table.sanitize (c, this)); 175 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::TTCHeader 178 if (unlikely (!u.header.version.sanitize (c))) return_trace (false); 181 case 1: return_trace (u.version1.sanitize (c)); 240 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::OpenTypeFontFile 243 if (unlikely (!u.tag.sanitize (c))) return_trace (false); 248 case TrueTypeTag: return_trace (u.fontFace.sanitize (c)) [all...] |
hb-ot-maxp-table.hh | 51 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::maxp
|
hb-ot-cmap-table.hh | 54 inline bool sanitize (hb_sanitize_context_t *c) const 146 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CmapSubtableFormat4 204 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CmapSubtableLongGroup 232 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CmapSubtableTrimmed 235 return_trace (c->check_struct (this) && glyphIdArray.sanitize (c)); 265 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CmapSubtableLongSegmented 268 return_trace (c->check_struct (this) && groups.sanitize (c)); 312 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::UnicodeValueRange 334 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::UVSMapping 374 inline bool sanitize (hb_sanitize_context_t *c, const void *base) cons function in struct:OT::VariationSelectorRecord 400 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CmapSubtableFormat14 436 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CmapSubtable 480 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::EncodingRecord 516 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::cmap [all...] |
hb-ot-layout-common-private.hh | 80 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::Record 84 return_trace (c->check_struct (this) && offset.sanitize (c, base, &closure)); 137 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::RecordListOf 140 return_trace (RecordArrayOf<Type>::sanitize (c, this)); 151 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::RangeRecord 216 inline bool sanitize (hb_sanitize_context_t *c, function in struct:OT::LangSys 220 return_trace (c->check_struct (this) && featureIndex.sanitize (c)); 256 inline bool sanitize (hb_sanitize_context_t *c, function in struct:OT::Script 260 return_trace (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this)) 280 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::FeatureParamsSize 392 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::FeatureParamsStylisticSet 426 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::FeatureParamsCharacterVariants 467 inline bool sanitize (hb_sanitize_context_t *c, hb_tag_t tag) const function in struct:OT::FeatureParams 509 inline bool sanitize (hb_sanitize_context_t *c, function in struct:OT::Feature 653 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::Lookup 711 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CoverageFormat1 798 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CoverageFormat2 894 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::Coverage 1007 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::ClassDefFormat1 1064 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::ClassDefFormat2 1122 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::ClassDef 1180 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::Device [all...] |
hb-ot-hmtx-table.hh | 60 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::_mtx
|
hb-ot-layout-gpos-table.hh | 167 if ((format & xPlaDevice) && !get_device (values++).sanitize (c, base)) return false; 168 if ((format & yPlaDevice) && !get_device (values++).sanitize (c, base)) return false; 169 if ((format & xAdvDevice) && !get_device (values++).sanitize (c, base)) return false; 170 if ((format & yAdvDevice) && !get_device (values++).sanitize (c, base)) return false; 214 /* Just sanitize referenced Device tables. Doesn't check the values themselves. */ 241 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::AnchorFormat1 271 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::AnchorFormat2 300 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::AnchorFormat3 303 return_trace (c->check_struct (this) && xDeviceTable.sanitize (c, this) && yDeviceTable.sanitize (c, this)) 336 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::Anchor 369 inline bool sanitize (hb_sanitize_context_t *c, unsigned int cols) const function in struct:OT::AnchorMatrix 395 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::MarkRecord 445 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MarkArray 482 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::SinglePosFormat1 534 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::SinglePosFormat2 664 inline bool sanitize (hb_sanitize_context_t *c, const sanitize_closure_t *closure) const function in struct:OT::PairSet 714 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::PairPosFormat1 805 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::PairPosFormat2 880 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::EntryExitRecord 1015 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CursivePosFormat1 1100 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MarkBasePosFormat1 1217 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MarkLigPosFormat1 1331 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MarkMarkPosFormat1 1490 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::PosLookup 1515 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::GPOS [all...] |
hb-ot-name-table.hh | 59 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::NameRecord 110 if (!nameRecord[i].sanitize (c, string_pool)) return_trace (false); 114 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::name
|
hb-ot-head-table.hh | 55 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::head
|
hb-ot-hhea-table.hh | 52 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::_hea
|
hb-ot-os2-table.hh | 46 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::os2
|
/external/clang/test/SemaTemplate/ |
array-to-pointer-decay.cpp | 22 template <typename Type> static bool sanitize() { function 26 bool closure = sanitize<int>();
|
/cts/tests/tests/net/src/android/net/cts/ |
UrlQuerySanitizer_IllegalCharacterValueSanitizerTest.java | 27 assertEquals("Joe User", sanitizer.sanitize("Joe<User"));
|
UrlQuerySanitizerTest.java | 147 assertEquals("Joe_User", vs.sanitize("Joe<User")); 149 assertEquals("Joe User", vs.sanitize("Joe<>\0User")); 151 assertEquals("Joe User", vs.sanitize("Joe\0User")); 153 assertEquals("Joe_User", vs.sanitize("Joe User")); 155 assertEquals("Joe User&", vs.sanitize("Joe User&")); 157 assertEquals("Joe_User&", vs.sanitize("Joe User&")); 159 assertEquals("Joe User ", vs.sanitize("Joe User&")); 161 assertEquals("Joe User&Smith%B5'\'", vs.sanitize("Joe User&Smith%B5'\'")); 163 assertEquals("Joe_User&Smith%B5'\'", vs.sanitize("Joe User&Smith%B5'\'")); 208 public String sanitize(String value) [all...] |
/external/elfutils/ |
Makefile.am | 42 --enable-valgrind --enable-sanitize-undefined \
|