src/main/java/de/digitalcollections/iiif/model/image/ImageApiSelector.java
private static String urlEncode(String str) {
    Set<String> excluded = ImmutableSet.of(
        ":", "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=");
    String encoded = new Encoded(str).toString();
    for (String ex : excluded) {
      encoded = encoded.replaceAll(new Encoded(ex).toString(), ex);
    }
    return encoded;
  }
private static String urlEncode(String str) {
    Set<String> excluded = ImmutableSet.of(
        ":", "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=");
    String encoded = new Encoded(str).toString();
    for (String ex : excluded) {
      encoded = encoded.replaceAll(new Encoded(ex).toString(), ex);
    }
    return encoded;
  }
private static String urlEncode ( String str ) { Set < String > excluded = ImmutableSet . of ( ":" , "!" , "$" , "&" , "'" , "(" , ")" , "*" , "+" , "," , ";" , "=" ) ; String encoded = new Encoded ( str ) . toString ( ) ; for ( String ex : excluded ) { encoded = encoded . replaceAll ( new Encoded ( ex ) . toString ( ) , ex ) ; } return encoded ; }
The spec says we have to urlencode values, but only characters outside of the US ASCII range and gen-delims
from RFC3986. However, our URL library can only encode the full set of gen-delims (EXCEPT the colon) and sub-delims,
which iswhy we have to manually decode the encoded sub-delims...
Great and pragmatic choice for readability, more code for us :-)
The spec says we have to urlencode values but only characters outside of the US ASCII range and gen - delims from RFC3986 . However our URL library can only encode the full set of gen - delims ( EXCEPT the colon ) and sub - delims which iswhy we have to manually decode the encoded sub - delims ... Great and pragmatic choice for readability more code for us : - )