Use raw methods on URI where a single string representation is constructed. URI(String) assumes no special characters.

This commit is contained in:
Eugene Vigdorchik 2012-06-14 12:28:20 +04:00 committed by Mark Harrah
parent 0578a49e43
commit 945fdd5baa
1 changed files with 2 additions and 2 deletions

View File

@ -27,9 +27,9 @@ class RichURI(uri: URI)
{
if (hasMarkerScheme)
if (hasFragment)
new URI(uri.getSchemeSpecificPart + "#" + uri.getFragment)
new URI(uri.getRawSchemeSpecificPart + "#" + uri.getRawFragment)
else
new URI(uri.getSchemeSpecificPart)
new URI(uri.getRawSchemeSpecificPart)
else
uri
}