com.atlassian.jira.util
Class UriValidator

java.lang.Object
  extended by 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 Summary
UriValidator(String encoding)
           
 
Method Summary
 String getSafeUri(String canonicalBaseUri, String uri)
          This method returns a safe URI - it firstly URL decodes and then only allows HTTP(s) schemes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UriValidator

public UriValidator(String encoding)
Method Detail

getSafeUri

public String getSafeUri(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


Copyright © 2002-2012 Atlassian. All Rights Reserved.