ICEfaces
  1. ICEfaces
  2. ICE-5582

Ensure ResponseWriter based compat components do escaping properly

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 2.0-Alpha3, 2.0.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces

      Description

      In ICEfaces 1.8 and before, we focused on direct-to-DOM rendering, and implemented text escaping in DOMUtils.escapeAnsi(). But in stock JSF, text escaping is provided by the ResponseWriter, in its writeText(-), writeAttribute(-) and writeURIAttribute(-) methods. All stock JSF components use those methods, so that everything is escaped by default. For the rare exception, like when outputText has escape=false, then the unescaped write(-) method is used.

      When we discovered that our DOMResponseWriter was missing this behaviour, it was too late to change it, because users were already working around it by manually escaping the output. We didn't want to break applications by double escaping. But now, with ICEfaces 2, we're able to make fixes that break backwards compatibility, so in ICE-3182, we'll be changing our ResponseWriter to follow the standard escaping rules.

      So, our ResponseWriter based compat components should be altered to not use DOMUtils.escapeAnsi() any more, and just use the appropriate ResponseWriter APIs instead.

        Issue Links

          Activity

          Mark Collette created issue -
          Mark Collette made changes -
          Field Original Value New Value
          Salesforce Case []
          Fix Version/s 2.0-Alpha3 [ 10032 ]
          Mark Collette made changes -
          Link This issue depends on ICE-3182 [ ICE-3182 ]
          Ken Fyten made changes -
          Assignee Mark Collette [ mark.collette ]
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Mark Collette [ mark.collette ] Greg Dick [ greg.dick ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21376 Fri May 07 11:21:46 MDT 2010 greg.dick ICE-5582 Use escaping versions of ResponseWriter API if necessary
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/OutputTextRenderer.java
          Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/TextareaRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21385 Mon May 10 15:13:30 MDT 2010 greg.dick ICE-5582 Doesn't support escape attribute, however, always escape using writeText
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/TextareaRenderer.java
          Hide
          Greg Dick added a comment -

          I fixed the outputTextRenderer to support the escape attribute and changed the textAreaRenderer to always use the writeText method. The rest of the compat components don't use the ResponseWriter API, but rather manipulate the DOM directly.

          Show
          Greg Dick added a comment - I fixed the outputTextRenderer to support the escape attribute and changed the textAreaRenderer to always use the writeText method. The rest of the compat components don't use the ResponseWriter API, but rather manipulate the DOM directly.
          Greg Dick made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Issue Type New Feature [ 2 ] Improvement [ 4 ]
          Salesforce Case []
          Ken Fyten made changes -
          Fix Version/s 2.0.0 [ 10230 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Greg Dick
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: