MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / encodeAnchor

Method encodeAnchor

src/main/java/org/htmlunit/util/UrlUtils.java:306–311  ·  view source on GitHub ↗

Encodes and escapes the specified URI anchor string. @param anchor the anchor string to encode and escape @return the encoded and escaped anchor string

(final String anchor)

Source from the content-addressed store, hash-verified

304 * @return the encoded and escaped anchor string
305 */
306 public static String encodeAnchor(final String anchor) {
307 if (anchor == null) {
308 return null;
309 }
310 return encode(anchor, ANCHOR_ALLOWED_CHARS, UTF_8);
311 }
312
313 /**
314 * Encodes and escapes the specified URI hash string.

Callers 2

getHostnameMethod · 0.95
getHostnameMethod · 0.95

Calls 1

encodeMethod · 0.95

Tested by

no test coverage detected