[ https://issues.apache.org/jira/browse/SLING-9777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204952#comment-17204952 ]
Georg Henzler commented on SLING-9777: -------------------------------------- The PR for SLING-7000 https://github.com/apache/sling-old-svn-mirror/pull/247 introduced {{unescapePercentInQuery}} in https://github.com/Buuhuu/sling/blob/72516b5072c2b22e2c95adc094446eaaee835d02/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/URIManipulationFilterExtension.java#L126 - with the approach as described in this ticket and after using SlingUri there, this should not be needed anymore - FYI [~kwin] [~diru] > Better handling for invalid URIs when using SlingUri (special characters, > spaces) > ---------------------------------------------------------------------------------- > > Key: SLING-9777 > URL: https://issues.apache.org/jira/browse/SLING-9777 > Project: Sling > Issue Type: Improvement > Components: API > Affects Versions: API 2.23.0 > Reporter: Georg Henzler > Assignee: Georg Henzler > Priority: Major > Fix For: API 2.23.2 > > > SlingUri should not "have an opinion" about when URIs should be encoded or > not. It should be able to deal with invalid URIs in a best effort manner > (e.g. URIs containing a space in the path are already invalid) and always try > to not change the identity of the URI (means: > {{UriBuilder.parse(inputStr,null).build().toString()}} should almost always > be equal to the original {{inputStr}}). This also means if the SlingUri > contains escape sequences (e.g. %20), it should keep them, if escape > sequences are unescaped already this is also fine when using the builder > (when using parse() this can lead to invalid URIs, best effort parsing shall > be used for those cases). -- This message was sent by Atlassian Jira (v8.3.4#803005)