Class UriValidator

java.lang.Object
com.atlassian.jira.util.UriValidator

public class UriValidator extends Object
Verify that a url is not executable Needs to be instantiated to support testing - oh PowerMock wherefore art thou
Since:
v4.2
  • Constructor Details

    • UriValidator

      public UriValidator(String encoding)
  • Method Details

    • getSafeUri

      @Nullable public String getSafeUri(@Nullable String canonicalBaseUri, String uri)
      This method returns a safe URI - it firstly URL decodes and then only allows HTTP(s) schemes
      Parameters:
      canonicalBaseUri - The base URI - if no trailing slash one will be provided
      uri - The uri to resolve
      Returns:
      A resolved URI, null if it is an unsuppported scheme, viz. Javascript