Skip to content

Commit fc72dde

Browse files
committed
Added comment regarding double decording of URLs
1 parent a3ae88a commit fc72dde

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • core/src/main/java/com/ocpsoft/pretty/faces/url

‎core/src/main/java/com/ocpsoft/pretty/faces/url/URL.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ private static String decodeSegment(final String segment)
145145
{
146146
try
147147
{
148+
149+
/*
150+
* Note: The replacement allows to call decode() on an already decoded URL
151+
* and supports decoding of strings that contain not encoded characters.
152+
* IHMO this is only needed because there seem to be situation in PrettyFaces
153+
* where decoded URLs are decoded again.
154+
*/
155+
148156
final URI uri = new URI(("http://localhost/" + segment)
149157
.replace(" ", "%20")
150158
.replace("\"", "%22")

0 commit comments

Comments
 (0)