Home
last modified time | relevance | path

Searched +full:html +full:- +full:escaper (Results 1 – 25 of 419) sorted by relevance

12345678910>>...17

/aosp_15_r20/prebuilts/go/linux-x86/src/html/template/
Descape.go2 // Use of this source code is governed by a BSD-style
10 "html"
29 err = &Error{ErrEndContext, nil, name, 0, fmt.Sprintf("ends in a non-text context: %v", c)}
84 // escaper collects type inferences about templates and changes needed to make
86 type escaper struct { struct
87 // ns is the nameSpace that this escaper is associated with.
114 // makeEscaper creates a blank escaper for the given set.
115 func makeEscaper(n *nameSpace) escaper {
116 return escaper{
136 func (e *escaper) escape(c context, n parse.Node) context { argument
[all …]
Derror.go2 // Use of this source code is governed by a BSD-style
23 // Description is a human-readable description of the problem.
75 // This is often due to a typo in an HTML element, but some runes
85 // Package html/template statically examines each path through an
87 // The example is ambiguous since {{.X}} might be an HTML text node,
88 // or a URL prefix in an HTML attribute. The context of {{.X}} is
90 // the run-time value of {{.C}} which is not statically known.
99 // ErrEndContext: "... ends in a non-text context: ..."
105 // Executed templates should produce a DocumentFragment of HTML.
107 // Templates that should not be used in an HTML context or that
[all …]
Descape_test.go2 // Use of this source code is governed by a BSD-style
40 W HTML
54 W: HTML(`&iexcl;<b class="foo">Hello</b>, <textarea>O'World</textarea>!`),
76 "Hello, {{.C | html}}!",
81 "Hello, {{html .C}}!",
236 "<button onclick='alert({{.A | html}})'>",
284 `<p style="border-{{"left"}}: 0; border-{{"right"}}: 1in">`,
285 `<p style="border-left: 0; border-right: 1in">`,
299 `<style>p{{"#my-ID"}} { font: Arial }</style>`,
300 `<style>p#my-ID { font: Arial }</style>`,
[all …]
Djs_test.go2 // Use of this source code is governed by a BSD-style
44 // Whether the + or - is infix or prefix, it cannot precede a
47 {jsCtxRegexp, "-"},
50 // pre-increment operator, but in practice devs do not try to
54 {jsCtxDivOp, "--"},
56 {jsCtxDivOp, "x--"},
59 {jsCtxRegexp, "x---"}, // A postfix -- then a -.
110 return nil, errors.New("beep */ boop </script blip <!--")
123 {int32(-42), " -42 ", false},
125 {int16(-42), " -42 ", false},
[all …]
/aosp_15_r20/external/guava/android/guava/src/com/google/common/net/
H A DUrlEscapers.java7 * http://www.apache.org/licenses/LICENSE-2.0
18 import com.google.common.escape.Escaper;
21 * {@code Escaper} instances suitable for strings to be included in particular sections of URLs.
23 * <p>If the resulting URLs are inserted into an HTML or XML document, they will require additional
24 * escaping with {@link com.google.common.html.HtmlEscapers} or {@link
37 // that are considered authoritative for the behavior of that escaper.
39 static final String URL_FORM_PARAMETER_OTHER_SAFE_CHARS = "-_.*";
42 "-._~" // Unreserved characters.
47 * Returns an {@link Escaper} instance that escapes strings so they can be safely included in <a
48 * href="https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set">URL
[all …]
/aosp_15_r20/external/guava/guava/src/com/google/common/net/
H A DUrlEscapers.java7 * http://www.apache.org/licenses/LICENSE-2.0
18 import com.google.common.escape.Escaper;
21 * {@code Escaper} instances suitable for strings to be included in particular sections of URLs.
23 * <p>If the resulting URLs are inserted into an HTML or XML document, they will require additional
24 * escaping with {@link com.google.common.html.HtmlEscapers} or {@link
37 // that are considered authoritative for the behavior of that escaper.
39 static final String URL_FORM_PARAMETER_OTHER_SAFE_CHARS = "-_.*";
42 "-._~" // Unreserved characters.
47 * Returns an {@link Escaper} instance that escapes strings so they can be safely included in <a
48 * href="https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set">URL
[all …]
/aosp_15_r20/external/guava/guava/src/com/google/common/html/
H A DHtmlEscapers.java7 * http://www.apache.org/licenses/LICENSE-2.0
15 package com.google.common.html;
18 import com.google.common.escape.Escaper;
22 * {@code Escaper} instances suitable for strings to be included in HTML attribute values and
24 * systems and high-level APIs that provide autoescaping.
25 * One Google-authored templating system available for external use is <a
28 * <p>HTML escaping is particularly tricky: For example, <a
29 * href="https://www.w3.org/TR/html4/types.html#h-6.2">some elements' text contents must not be HTML
30 * escaped</a>. As a result, it is impossible to escape an HTML document correctly without
31 * domain-specific knowledge beyond what {@code HtmlEscapers} provides. We strongly encourage the
[all …]
/aosp_15_r20/external/guava/android/guava/src/com/google/common/html/
H A DHtmlEscapers.java7 * http://www.apache.org/licenses/LICENSE-2.0
15 package com.google.common.html;
18 import com.google.common.escape.Escaper;
22 * {@code Escaper} instances suitable for strings to be included in HTML attribute values and
24 * systems and high-level APIs that provide autoescaping.
25 * One Google-authored templating system available for external use is <a
28 * <p>HTML escaping is particularly tricky: For example, <a
29 * href="https://www.w3.org/TR/html4/types.html#h-6.2">some elements' text contents must not be HTML
30 * escaped</a>. As a result, it is impossible to escape an HTML document correctly without
31 * domain-specific knowledge beyond what {@code HtmlEscapers} provides. We strongly encourage the
[all …]
/aosp_15_r20/external/jsilver/src/com/google/clearsilver/jsilver/syntax/
H A DVarOptimizer.java8 * http://www.apache.org/licenses/LICENSE-2.0
71 * &lt;cs? escape:&quot;html&quot; ?&gt;
87 * &lt;cs? escape:&quot;html&quot; ?&gt;
99 * &lt;cs? escape:&quot;html&quot; ?&gt;
105 * both the html escaper and the url escaping function. However ClearSilver treats top-level escaper
111 * &lt;cs? escape:&quot;html&quot; ?&gt;
117 * which fixes the problem because the new url escaper replaces the existing html escaper (rather
121 * escaper by ClearSilver but which does not (currently) have an escaper associated with it. This
125 * &lt;cs? escape:&quot;html&quot; ?&gt;
135 * A list of escaper names that are also exposed as escaping functions (eg, if the "foo" escaper
[all …]
/aosp_15_r20/external/turbine/java/com/google/common/escape/
H A DSourceCodeEscapers.java8 * http://www.apache.org/licenses/LICENSE-2.0
23 * A factory for Escaper instances used to escape strings for safe use in Java.
25 * <p>This is a subset of source code escapers that are in the process of being open-sourced as part
28 // TODO(cushon): migrate to the guava version once it is open-sourced, and delete this
33 // that are considered authoritative for the behavior of that escaper.
42 * Returns an {@link Escaper} instance that escapes special characters in a string so it can
46 * <p>See: <a href="https://docs.oracle.com/javase/specs/jls/se14/html/jls-3.html#jls-3.10.6" >The
68 // This escaper does not produce octal escape sequences. See:
69 // https://docs.oracle.com/javase/specs/jls/se14/html/jls-3.html#jls-3.10.6
/aosp_15_r20/external/sdk-platform-java/gapic-generator-java/src/main/java/com/google/api/generator/engine/escaper/
H A DHtmlEscaper.java7 // http://www.apache.org/licenses/LICENSE-2.0
15 package com.google.api.generator.engine.escaper;
17 import com.google.common.escape.Escaper;
20 public class HtmlEscaper extends Escaper {
24 // five characters by html escaper. We do not directly use guava HtmlEscapers here because
25 // it only escapes`<>&\"'` as specified by HTML 4.01.
26 private static final Escaper charEscaper =
H A DMetacharEscaper.java7 // http://www.apache.org/licenses/LICENSE-2.0
15 package com.google.api.generator.engine.escaper;
17 import com.google.common.escape.Escaper;
20 public class MetacharEscaper extends Escaper {
23 // Handle escape characters (https://docs.oracle.com/javase/tutorial/java/data/characters.html)
26 private static final Escaper charEscaper =
/aosp_15_r20/external/guava/android/guava/src/com/google/common/xml/
H A DXmlEscapers.java7 * http://www.apache.org/licenses/LICENSE-2.0
18 import com.google.common.escape.Escaper;
22 * {@code Escaper} instances suitable for strings to be included in XML attribute values and
24 * high-level APIs that provide autoescaping. For example, consider <a
28 * outside the ASCII character range. Unlike HTML escaping the XML escapers will not escape
29 * non-ASCII characters to their numeric entity replacements. These XML escapers provide the minimal
33 * href="http://www.w3.org/TR/2008/REC-xml-20081126/#charsets">2.2</a> and <a
34 * href="http://www.w3.org/TR/2008/REC-xml-20081126/#syntax">2.4</a> of the XML specification.
49 // that are considered authoritative for the behavior of that escaper.
52 * Returns an {@link Escaper} instance that escapes special characters in a string so it can
[all …]
/aosp_15_r20/external/guava/guava/src/com/google/common/xml/
H A DXmlEscapers.java7 * http://www.apache.org/licenses/LICENSE-2.0
18 import com.google.common.escape.Escaper;
22 * {@code Escaper} instances suitable for strings to be included in XML attribute values and
24 * high-level APIs that provide autoescaping. For example, consider <a
28 * outside the ASCII character range. Unlike HTML escaping the XML escapers will not escape
29 * non-ASCII characters to their numeric entity replacements. These XML escapers provide the minimal
33 * href="http://www.w3.org/TR/2008/REC-xml-20081126/#charsets">2.2</a> and <a
34 * href="http://www.w3.org/TR/2008/REC-xml-20081126/#syntax">2.4</a> of the XML specification.
49 // that are considered authoritative for the behavior of that escaper.
52 * Returns an {@link Escaper} instance that escapes special characters in a string so it can
[all …]
/aosp_15_r20/external/guava/guava/src/com/google/common/escape/
H A DEscaper.java7 * http://www.apache.org/licenses/LICENSE-2.0
26 * <p>For example, an XML escaper would convert the literal string {@code "Foo<Bar>"} into {@code
31 * <p>An {@code Escaper} instance is required to be stateless, and safe when used concurrently by
45 * implementing new escapers. It is strongly recommended that when implementing a new escaper you
50 * com.google.common.html.HtmlEscapers} and {@link com.google.common.xml.XmlEscapers}. To create
60 public abstract class Escaper { class
63 protected Escaper() {} in Escaper() method in Escaper
69 * escaper implementation.
72 * <li>{@link UnicodeEscaper} handles <a href="http://en.wikipedia.org/wiki/UTF-16">UTF-16</a>
73 * correctly, including surrogate character pairs. If the input is badly formed the escaper
[all …]
H A DUnicodeEscaper.java7 * http://www.apache.org/licenses/LICENSE-2.0
23 * An {@link Escaper} that converts literal text into a format safe for inclusion in a particular
27 * <p>For example, an XML escaper would convert the literal string {@code "Foo<Bar>"} into {@code
34 * href="http://en.wikipedia.org/wiki/UTF-16">UTF16</a> characters in isolation and may not cope
39 * correctly if you are considering implementing a new escaper you should favor using UnicodeEscaper
46 * com.google.common.html.HtmlEscapers} and {@link com.google.common.xml.XmlEscapers}. To create
54 public abstract class UnicodeEscaper extends Escaper {
89 * href="http://en.wikipedia.org/wiki/UTF-16">UTF-16</a> before calling this method.
91 * <p><b>Note:</b> When implementing an escaper it is a good idea to override this method for
110 * Scans a sub-sequence of characters from a given {@link CharSequence}, returning the index of
[all …]
H A DCharEscaper.java7 * http://www.apache.org/licenses/LICENSE-2.0
27 * <p>For example, an XML escaper would convert the literal string {@code "Foo<Bar>"} into {@code
36 * com.google.common.html.HtmlEscapers} and {@link com.google.common.xml.XmlEscapers}. To create
44 public abstract class CharEscaper extends Escaper {
58 // Inlineable fast-path loop which hands off to escapeSlow() only if needed in escape()
74 * than a one-character array containing the character itself. This enables the escaping algorithm
77 * <p>An escaper is expected to be able to deal with any {@code char} value, so this method should
119 int charsSkipped = index - lastEscape; in escapeSlow()
126 destSize = sizeNeeded + DEST_PAD_MULTIPLIER * (slen - index); in escapeSlow()
145 int charsLeft = slen - lastEscape; in escapeSlow()
[all …]
H A Dpackage-info.java7 * http://www.apache.org/licenses/LICENSE-2.0
17 * {@link Escaper}.
20 * com.google.common.html.HtmlEscapers} in {@code com.google.common.html}, {@link
24 * <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
/aosp_15_r20/external/guava/android/guava/src/com/google/common/escape/
H A DEscaper.java7 * http://www.apache.org/licenses/LICENSE-2.0
26 * <p>For example, an XML escaper would convert the literal string {@code "Foo<Bar>"} into {@code
31 * <p>An {@code Escaper} instance is required to be stateless, and safe when used concurrently by
45 * implementing new escapers. It is strongly recommended that when implementing a new escaper you
50 * com.google.common.html.HtmlEscapers} and {@link com.google.common.xml.XmlEscapers}. To create
60 public abstract class Escaper { class
63 protected Escaper() {} in Escaper() method in Escaper
69 * escaper implementation.
72 * <li>{@link UnicodeEscaper} handles <a href="http://en.wikipedia.org/wiki/UTF-16">UTF-16</a>
73 * correctly, including surrogate character pairs. If the input is badly formed the escaper
[all …]
H A DUnicodeEscaper.java7 * http://www.apache.org/licenses/LICENSE-2.0
23 * An {@link Escaper} that converts literal text into a format safe for inclusion in a particular
27 * <p>For example, an XML escaper would convert the literal string {@code "Foo<Bar>"} into {@code
34 * href="http://en.wikipedia.org/wiki/UTF-16">UTF16</a> characters in isolation and may not cope
39 * correctly if you are considering implementing a new escaper you should favor using UnicodeEscaper
46 * com.google.common.html.HtmlEscapers} and {@link com.google.common.xml.XmlEscapers}. To create
54 public abstract class UnicodeEscaper extends Escaper {
89 * href="http://en.wikipedia.org/wiki/UTF-16">UTF-16</a> before calling this method.
91 * <p><b>Note:</b> When implementing an escaper it is a good idea to override this method for
110 * Scans a sub-sequence of characters from a given {@link CharSequence}, returning the index of
[all …]
H A DCharEscaper.java7 * http://www.apache.org/licenses/LICENSE-2.0
27 * <p>For example, an XML escaper would convert the literal string {@code "Foo<Bar>"} into {@code
36 * com.google.common.html.HtmlEscapers} and {@link com.google.common.xml.XmlEscapers}. To create
44 public abstract class CharEscaper extends Escaper {
58 // Inlineable fast-path loop which hands off to escapeSlow() only if needed in escape()
74 * than a one-character array containing the character itself. This enables the escaping algorithm
77 * <p>An escaper is expected to be able to deal with any {@code char} value, so this method should
119 int charsSkipped = index - lastEscape; in escapeSlow()
126 destSize = sizeNeeded + DEST_PAD_MULTIPLIER * (slen - index); in escapeSlow()
145 int charsLeft = slen - lastEscape; in escapeSlow()
[all …]
H A Dpackage-info.java7 * http://www.apache.org/licenses/LICENSE-2.0
17 * {@link Escaper}.
20 * com.google.common.html.HtmlEscapers} in {@code com.google.common.html}, {@link
24 * <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a>
/aosp_15_r20/external/cldr/tools/cldr-code/src/main/java/org/unicode/cldr/util/
H A DCldrUtility.java3 * Copyright (c) 2002-2013, International Business Machines
69 * These need to be consistent with "CLDR-Code-Git-Commit" in tools/cldr-code/pom.xml
71 * <p>If and when "CLDR-Apps-Git-Commit" in tools/cldr-apps/pom.xml becomes usable for the
72 * cldr-apps war file, we may add APPS_SLUG = "CLDR-Apps" here, and in some contexts use
75 public static final String CODE_SLUG = "CLDR-Code";
77 public static final String GIT_COMMIT_SUFFIX = "-Git-Commit";
105 public static final UnicodeSet DIGITS = new UnicodeSet("[0-9]").freeze();
114 * .add("$alpha", "[a-zA-Z]")
115 * .add("$digit", "[0-9]")
116 * .add("$alphanum", "[a-zA-Z0-9]")
[all …]
/aosp_15_r20/external/jsilver/src/com/google/clearsilver/jsilver/
H A DJSilver.java8 * http://www.apache.org/licenses/LICENSE-2.0
74 * jSilver.render("say-hello", data, output);
298 // Strip out whitespace from rendered HTML content. in render()
406 * Registers a global escaper. This also makes it available as a Function named with "_escape"
409 public void registerGlobalEscaper(String name, TextFilter escaper) { in registerGlobalEscaper() argument
410 globalFunctions.registerFunction(name + "_escape", escaper, true); in registerGlobalEscaper()
411 globalFunctions.registerEscapeMode(name, escaper); in registerGlobalEscaper()
/aosp_15_r20/external/icu/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/regex/
H A DRuleParser.java2 // License & terms of use: http://www.unicode.org/copyright.html
25 import com.google.common.escape.Escaper;
34 private static final Pattern VAR = Pattern.compile("^%([A-Z])=(.*)$");
36 // Multi-line rules start with " ; " for some optional amount of whitespace.
48 private static final Escaper SPECIAL_CHARS_ESCAPER =
56 .filter(s -> s.startsWith("%")) in parseConfig()
58 .peek(m -> checkArgument(m.matches(), "invalid argument declaration: %s", m)) in parseConfig()
59 .collect(ImmutableMap.toImmutableMap(m -> m.group(1).charAt(0), m -> m.group(2))); in parseConfig()
68 this.staticVarMap = ImmutableMap.copyOf(filterValues(varMap, s -> !s.startsWith("//"))); in RuleParser()
71 filterValues(varMap, s -> s.startsWith("//")), in RuleParser()
[all …]

12345678910>>...17