From 7b4377ad9d8a7205416df8d6217ef2b010f89481 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Wed, 22 Jan 2025 16:07:17 +0100 Subject: vendor: delete --- vendor/github.com/google/safehtml/style.go | 304 ----------------------------- 1 file changed, 304 deletions(-) delete mode 100644 vendor/github.com/google/safehtml/style.go (limited to 'vendor/github.com/google/safehtml/style.go') diff --git a/vendor/github.com/google/safehtml/style.go b/vendor/github.com/google/safehtml/style.go deleted file mode 100644 index c11ac9d96..000000000 --- a/vendor/github.com/google/safehtml/style.go +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (c) 2017 The Go Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd - -package safehtml - -import ( - "bytes" - "fmt" - "regexp" - "strings" -) - -// A Style is an immutable string-like type which represents a sequence of CSS -// declarations (property_name1: property_value1; property_name2: property_value2; ...) -// and guarantees that its value will not cause untrusted script execution -// (cross-site scripting) when evaluated as CSS in a browser. -// -// Style's string representation can safely be: -// * Interpolated as the content of a quoted HTML style attribute. However, the -// Style string must be HTML-attribute-escaped before interpolation. -// * Interpolated as the content of a {}-wrapped block within a StyleSheet. -// '<' runes in the Style string must be CSS-escaped before interpolation. -// The Style string is also guaranteed not to be able to introduce new -// properties or elide existing ones. -// * Interpolated as the content of a {}-wrapped block within an HTML `. Escape this in case the Style user forgets to. - c == '"', c == '\\', // Must be CSS-escaped in . U+000A line feed is handled in the next case. - c <= '\u001F', c == '\u007F', // C0 control codes - c >= '\u0080' && c <= '\u009F', // C1 control codes - c == '\u2028', c == '\u2029': // Unicode newline characters - // See CSS escape sequence syntax at https://www.w3.org/TR/css-syntax-3/#escape-diagram. - fmt.Fprintf(&b, "\\%06X", c) - default: - b.WriteRune(c) - } - } - return b.String() -} -- cgit mrf-deployment