ICEfaces
  1. ICEfaces
  2. ICE-1755

outputLink incorrectly encodes space as "+" in path

    Details

    • Assignee Priority:
      P2
    • Salesforce Case Reference:
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Insert the link using

       <ice:outputText escape="false" value="#{bean.anchorText}" />
       
      where Bean.getAnchorText() returns literally
       
       <a href="http://localhost/webapp/file%20name.pdf" >PDF File</a>
       
      or implement a servlet that returns files requested with "+" in the path substituted for " ".

      Show
      Insert the link using  <ice:outputText escape="false" value="#{bean.anchorText}" />   where Bean.getAnchorText() returns literally    <a href=" http://localhost/webapp/file%20name.pdf " >PDF File</a>   or implement a servlet that returns files requested with "+" in the path substituted for " ".

      Description

      OutputLink is implemented as HttpServletResponse.encodeURL(url) as specified, so the "+" signs are being inserted by the standard Servlet URL encoding. It would be possible to use a different encoding method with ice:outputLink (indicated by a flag; this would be a new feature).

      <ice:outputLink percentEncode="true" value="http://host/some path/" />

      (percentEncode would force " " to be encoded as %20, over-riding HttpServletResponse.encodeURL(url))

      Note that using "+" in the path segment of a URL appears to be incorrect (http://www.ietf.org/rfc/rfc2396.txt does not indicate that "+" is reserved in the path component) so the JSF specified behavior is causing the problem.

        Activity

        Ted Goddard created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000W4KB3AAN
        Ken Fyten made changes -
        Assignee Arturo Zambrano [ artzambrano ]
        Fix Version/s 3.4 [ 10770 ]
        Fix Version/s EE-1.8.2.GA_P08 [ 11178 ]
        Affects Documentation (User Guide, Ref. Guide, etc.) [ 10003 ]
        Assignee Priority P2 [ 10011 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38227 Thu Sep 19 11:07:21 MDT 2013 art.zambrano ICE-1755 added percentEncode attribute
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/OutputLinkRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/HtmlOutputLink.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/component-metadata/src/main/resources/conf/ice_properties/ice-outputLink-props.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/OutputLinkRenderer.java
        Hide
        Arturo Zambrano added a comment -

        Committed new feature to 3.x trunk at revision 38227 and to 1.8 trunk at revision 38228. Added percentEncode attribute to ice:outputLink.

        Show
        Arturo Zambrano added a comment - Committed new feature to 3.x trunk at revision 38227 and to 1.8 trunk at revision 38228. Added percentEncode attribute to ice:outputLink.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38228 Thu Sep 19 11:27:56 MDT 2013 art.zambrano ICE-1755 added percentEncode attribute
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/OutputLinkRenderer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/OutputLinkRenderer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/HtmlOutputLink.java
        Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/ice_properties/ice-outputLink-props.xml
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P02 [ 11371 ]
        Ken Fyten made changes -
        Assignee Arturo Zambrano [ artzambrano ] Mircea Toma [ mircea.toma ]
        Hide
        Mircea Toma added a comment -

        Back-ported fix.

        Show
        Mircea Toma added a comment - Back-ported fix.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: