Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 20 for Escapers (0.06 seconds)

  1. guava-tests/test/com/google/common/escape/EscapersTest.java

        Escaper escaper = Escapers.builder().setSafeRange('a', 'z').build();
        assertThat(escaper.escape("The Quick Brown Fox")).isEqualTo("The Quick Brown Fox");
      }
    
      public void testBuilderInitialStateNoneUnsafe() {
        // No characters are unsafe by default (safeMin == 0, safeMax == 0xFFFF).
        Escaper escaper = Escapers.builder().setUnsafeReplacement("X").build();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 05:21:26 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/net/UrlEscaperTesting.java

    @NullUnmarked
    final class UrlEscaperTesting {
      /**
       * Helper to assert common expected behaviour of uri escapers. You should call
       * assertBasicUrlEscaper() unless the escaper explicitly does not escape '%'.
       */
      @SuppressWarnings("nullness") // test of a bogus call
      static void assertBasicUrlEscaperExceptPercent(UnicodeEscaper e) {
        // URL escapers should throw null pointer exceptions for null input
        try {
          e.escape((String) null);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/net/UrlEscaperTesting.java

    @NullUnmarked
    final class UrlEscaperTesting {
      /**
       * Helper to assert common expected behaviour of uri escapers. You should call
       * assertBasicUrlEscaper() unless the escaper explicitly does not escape '%'.
       */
      @SuppressWarnings("nullness") // test of a bogus call
      static void assertBasicUrlEscaperExceptPercent(UnicodeEscaper e) {
        // URL escapers should throw null pointer exceptions for null input
        try {
          e.escape((String) null);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/escape/EscapersTest.java

        Escaper escaper = Escapers.builder().setSafeRange('a', 'z').build();
        assertThat(escaper.escape("The Quick Brown Fox")).isEqualTo("The Quick Brown Fox");
      }
    
      public void testBuilderInitialStateNoneUnsafe() {
        // No characters are unsafe by default (safeMin == 0, safeMax == 0xFFFF).
        Escaper escaper = Escapers.builder().setUnsafeReplacement("X").build();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 05:21:26 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test all escapes
        assertThat(xmlAttributeEscaper.escape("a\"b<c>d&e\"f'"))
            .isEqualTo("a&quot;b&lt;c&gt;d&amp;e&quot;f&apos;");
        // Test '\t', '\n' and '\r' are escaped.
        assertThat(xmlAttributeEscaper.escape("a\tb\nc\rd")).isEqualTo("a&#x9;b&#xA;c&#xD;d");
      }
    
      // Helper to assert common properties of xml escapers.
      static void assertBasicXmlEscaper(
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 5K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test all escapes
        assertThat(xmlAttributeEscaper.escape("a\"b<c>d&e\"f'"))
            .isEqualTo("a&quot;b&lt;c&gt;d&amp;e&quot;f&apos;");
        // Test '\t', '\n' and '\r' are escaped.
        assertThat(xmlAttributeEscaper.escape("a\tb\nc\rd")).isEqualTo("a&#x9;b&#xA;c&#xD;d");
      }
    
      // Helper to assert common properties of xml escapers.
      static void assertBasicXmlEscaper(
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 5K bytes
    - Click Count (0)
  7. android/guava/src/com/google/common/escape/UnicodeEscaper.java

     * correctly if you are considering implementing a new escaper you should favor using UnicodeEscaper
     * wherever possible.
     *
     * <p>A {@code UnicodeEscaper} instance is required to be stateless, and safe when used concurrently
     * by multiple threads.
     *
     * <p>Popular escapers are defined as constants in classes like {@link
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Jan 24 04:06:11 GMT 2026
    - 13.2K bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/escape/UnicodeEscaperTest.java

          "\0abyz\u0080\u0100\u0800\u1000ABYZ\uffff" + SMALLEST_SURROGATE + "0189" + LARGEST_SURROGATE;
    
      // Escapes nothing
      private static final UnicodeEscaper NOP_ESCAPER =
          new UnicodeEscaper() {
            @Override
            protected char @Nullable [] escape(int c) {
              return null;
            }
          };
    
      // Escapes everything except [a-zA-Z0-9]
      private static final UnicodeEscaper SIMPLE_ESCAPER =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 05:21:26 GMT 2026
    - 6K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/net/UrlEscapersTest.java

        UnicodeEscaper e = (UnicodeEscaper) urlFormParameterEscaper();
        // Verify that these are the same escaper (as documented)
        assertThat(urlFormParameterEscaper()).isSameInstanceAs(e);
        assertBasicUrlEscaper(e);
    
        /*
         * Specified as safe by RFC 2396 but not by java.net.URLEncoder. These tests will start failing
         * when the escaper is made compliant with RFC 2396, but that's a good thing (just change them
         * to assertUnescaped).
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 2.8K bytes
    - Click Count (0)
  10. src/main/java/org/codelibs/fess/ldap/LdapUtil.java

    package org.codelibs.fess.ldap;
    
    /**
     * Utility class for LDAP operations.
     */
    public final class LdapUtil {
    
        private LdapUtil() {
        }
    
        /**
         * Escapes special characters in a value for use in LDAP search filters.
         * This method escapes characters that have special meaning in LDAP filter expressions
         * to prevent LDAP injection attacks.
         *
         * @param value the value to escape (null is treated as empty string)
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Jan 02 08:06:20 GMT 2026
    - 2K bytes
    - Click Count (0)
Back to Top