Uploaded image for project: 'MyFaces Tobago'
  1. MyFaces Tobago
  2. TOBAGO-1750

Problem with length validation in textarea (CRLF vs. LF)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • Core
    • None

    Description

      There is a problem with the length of text with line breaks.
      The HTML5 spec. says, CRLF has to be treated as a single character in the browser .
      Over HTTP/1.1 two characters must be transported.
      When the string is validated in a JSF <f:validateLength> the String is N characters longer than in the browser, when it contains N line breaks.

      To "repair" this situation, Tobago should replace CRLF with LF in the submitted values of textarea.

      For compatibility reasons, this should be configurable in the tobago-config.xml:

      <!-- true is the default -->
      <decode-line-feed>true</decode-line-feed>
      

      Attachments

        Activity

          People

            lofwyr Udo Schnurpfeil
            lofwyr Udo Schnurpfeil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: