com.atlassian.jira.util
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
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 |
UriValidator
public UriValidator(String encoding)
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 provideduri
- The uri to resolve
- Returns:
- A resolved URI, null if it is an unsuppported scheme, viz. Javascript
Copyright © 2002-2012 Atlassian. All Rights Reserved.