Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27505

A blank line in the beginning of a textarea is removed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 1.605

      A blank line in the beginning of a textarea is removed.
      It is caused for the specification of HTML:
      http://www.w3.org/TR/html5/syntax.html#syntax-newlines

      A single newline may be placed immediately after the start tag of pre and textarea elements. If the element's contents are intended to start with a newline, two consecutive newlines thus need to be included by the author.

      (I could not found the description in HTML4.01)

      How to reproduce an issue:

      1. Create a new free style project.
      2. Check "This build is parameterized"
      3. Add "Choice Parameter":
        • Name: PARAM1
        • Choices
          value1
          
          value2
          
          value3
          
      4. Save the project configuration.
      5. Click "configuration" and go to the project configuration page again.
      6. Choices of PARAM1 gets like this:
        value1
        
        value2
        
        value3
        
        • The empty line at the beginning is removed!

          [JENKINS-27505] A blank line in the beginning of a textarea is removed

          Daniel Beck added a comment -

          I always thought core trimmed this deliberately. Great find!

          Daniel Beck added a comment - I always thought core trimmed this deliberately. Great find!

          Code changed in jenkins
          User: ikedam
          Path:
          test/src/test/groovy/lib/form/TextAreaTest.groovy
          http://jenkins-ci.org/commit/jenkins/979ddba0ced2dabc62851e428a2e03d587892e0d
          Log:
          JENKINS-27505 Added a test to reproduce JENKINS-27505. The empty line at the beginning will be removed in a textarea.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: test/src/test/groovy/lib/form/TextAreaTest.groovy http://jenkins-ci.org/commit/jenkins/979ddba0ced2dabc62851e428a2e03d587892e0d Log: JENKINS-27505 Added a test to reproduce JENKINS-27505 . The empty line at the beginning will be removed in a textarea.

          Code changed in jenkins
          User: ikedam
          Path:
          test/src/test/resources/lib/form/TextAreaTest/TextareaTestBuilder/config.jelly
          http://jenkins-ci.org/commit/jenkins/d135db19b21d54e67317b8ef7e5cffb4d31a3b5f
          Log:
          JENKINS-27505 Add config.jelly for TextareaTestBuilder

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: test/src/test/resources/lib/form/TextAreaTest/TextareaTestBuilder/config.jelly http://jenkins-ci.org/commit/jenkins/d135db19b21d54e67317b8ef7e5cffb4d31a3b5f Log: JENKINS-27505 Add config.jelly for TextareaTestBuilder

          Code changed in jenkins
          User: ikedam
          Path:
          core/src/main/resources/lib/form/textarea.jelly
          http://jenkins-ci.org/commit/jenkins/9794f026830ae3a9bcd2458a431fd5ee8590a0fe
          Log:
          [FIXED JENKINS-27505] Preserve an empty line in the beginning of a textarea.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: core/src/main/resources/lib/form/textarea.jelly http://jenkins-ci.org/commit/jenkins/9794f026830ae3a9bcd2458a431fd5ee8590a0fe Log: [FIXED JENKINS-27505] Preserve an empty line in the beginning of a textarea.

          Code changed in jenkins
          User: ikedam
          Path:
          test/src/test/groovy/lib/form/TextAreaTest.groovy
          http://jenkins-ci.org/commit/jenkins/236632ba7170b073bc269bc64a3633da981dce24
          Log:
          JENKINS-27505 Added a test for two initial newlines.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: test/src/test/groovy/lib/form/TextAreaTest.groovy http://jenkins-ci.org/commit/jenkins/236632ba7170b073bc269bc64a3633da981dce24 Log: JENKINS-27505 Added a test for two initial newlines.

          Code changed in jenkins
          User: ikedam
          Path:
          test/src/test/groovy/lib/form/TextAreaTest.groovy
          http://jenkins-ci.org/commit/jenkins/f0a88e65be79628b4cd407b0d7576d7a1abcdd9e
          Log:
          JENKINS-27505 Collapse tests for JENKINS-27505 to save execution time.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: test/src/test/groovy/lib/form/TextAreaTest.groovy http://jenkins-ci.org/commit/jenkins/f0a88e65be79628b4cd407b0d7576d7a1abcdd9e Log: JENKINS-27505 Collapse tests for JENKINS-27505 to save execution time.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/resources/lib/form/textarea.jelly
          test/src/test/groovy/lib/form/TextAreaTest.groovy
          test/src/test/resources/lib/form/TextAreaTest/TextareaTestBuilder/config.jelly
          http://jenkins-ci.org/commit/jenkins/b23b3cfae4a03ede423389c84f0a5b56d07dc1da
          Log:
          Merge pull request #1612 from ikedam/feature/JENKINS-27505_TextareaStartsEmptyLine

          JENKINS-27505 Preserve an empty line at the beginning of a textarea

          Compare: https://github.com/jenkinsci/jenkins/compare/0fe7c694d075...b23b3cfae4a0

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/resources/lib/form/textarea.jelly test/src/test/groovy/lib/form/TextAreaTest.groovy test/src/test/resources/lib/form/TextAreaTest/TextareaTestBuilder/config.jelly http://jenkins-ci.org/commit/jenkins/b23b3cfae4a03ede423389c84f0a5b56d07dc1da Log: Merge pull request #1612 from ikedam/feature/ JENKINS-27505 _TextareaStartsEmptyLine JENKINS-27505 Preserve an empty line at the beginning of a textarea Compare: https://github.com/jenkinsci/jenkins/compare/0fe7c694d075...b23b3cfae4a0

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4369
          JENKINS-27505 Added a test to reproduce JENKINS-27505. The empty line at the beginning will be removed in a textarea. (Revision 979ddba0ced2dabc62851e428a2e03d587892e0d)
          JENKINS-27505 Add config.jelly for TextareaTestBuilder (Revision d135db19b21d54e67317b8ef7e5cffb4d31a3b5f)
          [FIXED JENKINS-27505] Preserve an empty line in the beginning of a textarea. (Revision 9794f026830ae3a9bcd2458a431fd5ee8590a0fe)
          JENKINS-27505 Added a test for two initial newlines. (Revision 236632ba7170b073bc269bc64a3633da981dce24)
          JENKINS-27505 Collapse tests for JENKINS-27505 to save execution time. (Revision f0a88e65be79628b4cd407b0d7576d7a1abcdd9e)

          Result = SUCCESS
          devld : 979ddba0ced2dabc62851e428a2e03d587892e0d
          Files :

          • test/src/test/groovy/lib/form/TextAreaTest.groovy

          devld : d135db19b21d54e67317b8ef7e5cffb4d31a3b5f
          Files :

          • test/src/test/resources/lib/form/TextAreaTest/TextareaTestBuilder/config.jelly

          devld : 9794f026830ae3a9bcd2458a431fd5ee8590a0fe
          Files :

          • core/src/main/resources/lib/form/textarea.jelly

          devld : 236632ba7170b073bc269bc64a3633da981dce24
          Files :

          • test/src/test/groovy/lib/form/TextAreaTest.groovy

          devld : f0a88e65be79628b4cd407b0d7576d7a1abcdd9e
          Files :

          • test/src/test/groovy/lib/form/TextAreaTest.groovy

          dogfood added a comment - Integrated in jenkins_main_trunk #4369 JENKINS-27505 Added a test to reproduce JENKINS-27505 . The empty line at the beginning will be removed in a textarea. (Revision 979ddba0ced2dabc62851e428a2e03d587892e0d) JENKINS-27505 Add config.jelly for TextareaTestBuilder (Revision d135db19b21d54e67317b8ef7e5cffb4d31a3b5f) [FIXED JENKINS-27505] Preserve an empty line in the beginning of a textarea. (Revision 9794f026830ae3a9bcd2458a431fd5ee8590a0fe) JENKINS-27505 Added a test for two initial newlines. (Revision 236632ba7170b073bc269bc64a3633da981dce24) JENKINS-27505 Collapse tests for JENKINS-27505 to save execution time. (Revision f0a88e65be79628b4cd407b0d7576d7a1abcdd9e) Result = SUCCESS devld : 979ddba0ced2dabc62851e428a2e03d587892e0d Files : test/src/test/groovy/lib/form/TextAreaTest.groovy devld : d135db19b21d54e67317b8ef7e5cffb4d31a3b5f Files : test/src/test/resources/lib/form/TextAreaTest/TextareaTestBuilder/config.jelly devld : 9794f026830ae3a9bcd2458a431fd5ee8590a0fe Files : core/src/main/resources/lib/form/textarea.jelly devld : 236632ba7170b073bc269bc64a3633da981dce24 Files : test/src/test/groovy/lib/form/TextAreaTest.groovy devld : f0a88e65be79628b4cd407b0d7576d7a1abcdd9e Files : test/src/test/groovy/lib/form/TextAreaTest.groovy

            ikedam ikedam
            ikedam ikedam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: