@Test public void isEscaped_WithHost() { Assert.assertTrue(UrlUtil.isEscaped("http: Assert.assertTrue(UrlUtil.isEscaped("http: Assert.assertTrue(UrlUtil.isEscaped("http: Assert.assertTrue(UrlUtil.isEscaped("https: Assert.assertTrue(UrlUtil.isEscaped("https: Assert.assertFalse(UrlUtil.isEscaped("https: Assert.assertFalse(UrlUtil.isEscaped("https: Assert.assertFalse(UrlUtil.isEscaped("http: Assert.assertFalse(UrlUtil.isEscaped("http: }
public static final boolean isEscaped(final String candidate) { if (candidate == null) { return false; } String unescaped = Text.unescape(StringUtils.stripToEmpty(candidate)); unescaped = StringUtils.replace(unescaped, "/_jcr_content", "/jcr:content"); if (!StringUtils.equals(unescaped, candidate)) { return true; } if (StringUtils.equals(escape(candidate, false), candidate)) { return true; } return false; }
UrlUtil { public static final boolean isEscaped(final String candidate) { if (candidate == null) { return false; } String unescaped = Text.unescape(StringUtils.stripToEmpty(candidate)); unescaped = StringUtils.replace(unescaped, "/_jcr_content", "/jcr:content"); if (!StringUtils.equals(unescaped, candidate)) { return true; } if (StringUtils.equals(escape(candidate, false), candidate)) { return true; } return false; } }
UrlUtil { public static final boolean isEscaped(final String candidate) { if (candidate == null) { return false; } String unescaped = Text.unescape(StringUtils.stripToEmpty(candidate)); unescaped = StringUtils.replace(unescaped, "/_jcr_content", "/jcr:content"); if (!StringUtils.equals(unescaped, candidate)) { return true; } if (StringUtils.equals(escape(candidate, false), candidate)) { return true; } return false; }  }
UrlUtil { public static final boolean isEscaped(final String candidate) { if (candidate == null) { return false; } String unescaped = Text.unescape(StringUtils.stripToEmpty(candidate)); unescaped = StringUtils.replace(unescaped, "/_jcr_content", "/jcr:content"); if (!StringUtils.equals(unescaped, candidate)) { return true; } if (StringUtils.equals(escape(candidate, false), candidate)) { return true; } return false; }  static final String escape(final String unescaped); static final String escape(final String unescaped, final boolean preventDoubleEscaping); static final boolean isEscaped(final String candidate); }
UrlUtil { public static final boolean isEscaped(final String candidate) { if (candidate == null) { return false; } String unescaped = Text.unescape(StringUtils.stripToEmpty(candidate)); unescaped = StringUtils.replace(unescaped, "/_jcr_content", "/jcr:content"); if (!StringUtils.equals(unescaped, candidate)) { return true; } if (StringUtils.equals(escape(candidate, false), candidate)) { return true; } return false; }  static final String escape(final String unescaped); static final String escape(final String unescaped, final boolean preventDoubleEscaping); static final boolean isEscaped(final String candidate);  }