- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for srcsetFilterAndEscaper (0.41 sec)
-
src/html/template/url_test.go
}, { "right bad", "/bogus#, javascript:alert(1)", "/bogus#,#ZgotmplZ", }, } for _, test := range tests { if got := srcsetFilterAndEscaper(test.input); got != test.want { t.Errorf("%s: srcsetFilterAndEscaper(%q) want %q != %q", test.name, test.input, test.want, got) } } } func BenchmarkURLEscaper(b *testing.B) { for i := 0; i < b.N; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 3.9K bytes - Viewed (0) -
src/html/template/url.go
written = i + 1 } b.WriteString(s[written:]) return written != 0 } // Filters and normalizes srcset values which are comma separated // URLs followed by metadata. func srcsetFilterAndEscaper(args ...any) string { s, t := stringify(args...) switch t { case contentTypeSrcset: return s case contentTypeURL: // Normalizing gets rid of all HTML whitespace
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:48:16 UTC 2022 - 6.6K bytes - Viewed (0)