/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...] |
/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-var-hvar-table.hh | 38 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::DeltaSetIndexMap 104 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::HVARVVAR 107 return_trace (version.sanitize (c) && 109 varStore.sanitize (c, this) && 110 advMap.sanitize (c, this) && 111 lsbMap.sanitize (c, this) && 112 rsbMap.sanitize (c, this)); 147 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::VVAR 150 return_trace (static_cast<const HVARVVAR *> (this)->sanitize (c) && 151 vorgMap.sanitize (c, this)) [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)); 188 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CaretValue 191 if (!u.format.sanitize (c)) return_trace (false); 193 case 1: return_trace (u.format1.sanitize (c)) 231 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::LigGlyph 267 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::LigCaretList 290 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MarkGlyphSetsFormat1 315 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MarkGlyphSets 387 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::GDEF [all...] |
hb-ot-math-table.hh | 44 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::MathValueRecord 47 return_trace (c->check_struct (this) && deviceTable.sanitize (c, base)); 68 if (!mathValueRecords[i].sanitize (c, this)) 74 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathConstants 168 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathItalicsCorrectionInfo 172 coverage.sanitize (c, this) && 173 italicsCorrection.sanitize (c, this)); 199 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathTopAccentAttachment 203 topAccentCoverage.sanitize (c, this) && 204 topAccentAttachment.sanitize (c, this)) 241 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathKern 298 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::MathKernInfoRecord 331 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathKernInfo 365 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathGlyphInfo 420 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathGlyphVariantRecord 450 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathGlyphPartRecord 495 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathGlyphAssembly 540 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathGlyphConstruction 595 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MathVariants 688 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MATH [all...] |
hb-open-file-private.hh | 59 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::TableRecord 121 inline bool sanitize (hb_sanitize_context_t *c) const 124 return_trace (c->check_struct (this) && tables.sanitize (c)); 147 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::TTCHeaderVersion1 150 return_trace (table.sanitize (c, this)); 187 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::TTCHeader 190 if (unlikely (!u.header.version.sanitize (c))) return_trace (false); 193 case 1: return_trace (u.version1.sanitize (c)); 252 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::OpenTypeFontFile 255 if (unlikely (!u.tag.sanitize (c))) return_trace (false) [all...] |
hb-ot-kern-table.hh | 59 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::KernPair 84 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::KernSubTableFormat0 87 return_trace (pairs.sanitize (c)); 100 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::KernClassTable 103 return_trace (firstGlyph.sanitize (c) && classes.sanitize (c)); 129 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::KernSubTableFormat2 132 return_trace (rowWidth.sanitize (c) && 133 leftClassTable.sanitize (c, this) && 134 rightClassTable.sanitize (c, this) & 164 inline bool sanitize (hb_sanitize_context_t *c, unsigned int format) const function in struct:OT::KernSubTable 204 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::KernSubTableWrapper 235 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::KernTable 348 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::kern [all...] |
hb-ot-cbdt-table.hh | 36 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::SmallGlyphMetrics 70 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::SBitLineMetrics 99 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::IndexSubtableHeader 115 inline bool sanitize (hb_sanitize_context_t *c, unsigned int glyph_count) const function in struct:OT::IndexSubtableFormat1Or3 145 inline bool sanitize (hb_sanitize_context_t *c, unsigned int glyph_count) const function in struct:OT::IndexSubtable 148 if (!u.header.sanitize (c)) return_trace (false); 150 case 1: return_trace (u.format1.sanitize (c, glyph_count)); 151 case 3: return_trace (u.format3.sanitize (c, glyph_count)); 191 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::IndexSubtableRecord 196 offsetToSubtable.sanitize (c, this, lastGlyphIndex - firstGlyphIndex + 1)) 226 inline bool sanitize (hb_sanitize_context_t *c, unsigned int count) const function in struct:OT::IndexSubtableArray 262 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::BitmapSizeTable 322 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CBLC 369 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CBDT [all...] |
hb-ot-maxp-table.hh | 51 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::maxp
|
hb-ot-var-mvar-table.hh | 38 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::VariationValueRecord 63 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::MVAR 66 return_trace (version.sanitize (c) && 70 varStore.sanitize (c, this) &&
|
hb-ot-layout-common-private.hh | 76 inline bool sanitize (hb_sanitize_context_t *c, const void *base) const function in struct:OT::Record 80 return_trace (c->check_struct (this) && offset.sanitize (c, base, &closure)); 133 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::RecordListOf 136 return_trace (RecordArrayOf<Type>::sanitize (c, this)); 147 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::RangeRecord 212 inline bool sanitize (hb_sanitize_context_t *c, function in struct:OT::LangSys 216 return_trace (c->check_struct (this) && featureIndex.sanitize (c)); 252 inline bool sanitize (hb_sanitize_context_t *c, function in struct:OT::Script 256 return_trace (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this)) 276 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::FeatureParamsSize 388 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::FeatureParamsStylisticSet 422 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::FeatureParamsCharacterVariants 463 inline bool sanitize (hb_sanitize_context_t *c, hb_tag_t tag) const function in struct:OT::FeatureParams 505 inline bool sanitize (hb_sanitize_context_t *c, function in struct:OT::Feature 649 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::Lookup 707 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CoverageFormat1 796 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::CoverageFormat2 901 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::Coverage 1016 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::ClassDefFormat1 1098 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::ClassDefFormat2 1170 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::ClassDef 1251 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::VarRegionAxis 1289 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::VarRegionList 1345 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::VarData 1385 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::VariationStore 1619 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::ConditionFormat1 1685 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::VariationDevice 1744 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::Device [all...] |
hb-ot-var-avar-table.hh | 37 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::AxisValueMap 101 inline bool sanitize (hb_sanitize_context_t *c) const function in struct:OT::avar 104 if (unlikely (!(version.sanitize (c) && 113 if (unlikely (!map->sanitize (c)))
|
/external/clang/test/SemaTemplate/ |
array-to-pointer-decay.cpp | 22 template <typename Type> static bool sanitize() { function 26 bool closure = sanitize<int>();
|
/external/libcxx/test/support/ |
filesystem_dynamic_test_helper.py | 20 def sanitize(p): function 45 root_p = sanitize(root_p) 51 root_p = sanitize(root_p) 57 with open(sanitize(fname), 'w') as f: 62 os.mkdir(sanitize(dname)) 66 os.symlink(sanitize(source), sanitize(link)) 70 os.link(sanitize(source), sanitize(link)) 74 os.mkfifo(sanitize(source) [all...] |
/prebuilts/ndk/r16/sources/cxx-stl/llvm-libc++/test/support/ |
filesystem_dynamic_test_helper.py | 20 def sanitize(p): function 45 root_p = sanitize(root_p) 51 root_p = sanitize(root_p) 57 with open(sanitize(fname), 'w') as f: 62 os.mkdir(sanitize(dname)) 66 os.symlink(sanitize(source), sanitize(link)) 70 os.link(sanitize(source), sanitize(link)) 74 os.mkfifo(sanitize(source) [all...] |
/build/soong/cc/ |
sanitize.go | 45 minimalRuntimeFlags = []string{"-fsanitize-minimal-runtime", "-fno-sanitize-trap=integer", "-fno-sanitize-recover=integer"} 82 Sanitize struct { 121 type sanitize struct { type 132 func (sanitize *sanitize) props() []interface{} { 133 return []interface{}{&sanitize.Properties} 136 func (sanitize *sanitize) begin(ctx BaseModuleContext) { 137 s := &sanitize.Properties.Sanitiz [all...] |
/cts/tests/autofillservice/src/android/autofillservice/cts/ |
TextValueSanitizerTest.java | 48 assertThat(sanitizer.sanitize(null)).isNull(); 55 assertThat(sanitizer.sanitize(value)).isNull(); 63 assertThat(sanitizer.sanitize(value)).isNull(); 70 assertThat(sanitizer.sanitize(value)).isNull(); 77 assertThat(sanitizer.sanitize(AutofillValue.forText("42")).getTextValue()) 85 assertThat(sanitizer.sanitize(AutofillValue.forText("blah 42 blaH")).getTextValue()) 93 assertThat(sanitizer.sanitize(AutofillValue.forText(" 42 ")).getTextValue())
|
/cts/tests/tests/net/src/android/net/cts/ |
UrlQuerySanitizer_IllegalCharacterValueSanitizerTest.java | 27 assertEquals("Joe User", sanitizer.sanitize("Joe<User"));
|
/frameworks/base/core/java/android/service/autofill/ |
InternalSanitizer.java | 42 public abstract AutofillValue sanitize(@NonNull AutofillValue value); method in class:InternalSanitizer
|
/frameworks/av/drm/libmediadrm/ |
PluginMetricsReporting.cpp | 53 String8 sanitize(const String8& input) { function in namespace:android::__anon44921 75 sanitize(vendor).c_str(), 76 sanitize(description).c_str());
|