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

A blank line in the beginning of a textarea is removed

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.605
    • Similar Issues:

      Description

      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!

        Attachments

          Issue Links

            Activity

            ikedam ikedam created issue -
            Hide
            danielbeck Daniel Beck added a comment -

            I always thought core trimmed this deliberately. Great find!

            Show
            danielbeck Daniel Beck added a comment - I always thought core trimmed this deliberately. Great find!
            ikedam ikedam made changes -
            Field Original Value New Value
            Remote Link This issue links to "PR-1612 (Web Link)" [ 12172 ]
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            scm_issue_link SCM/JIRA link daemon made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            dogfood 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
            Show
            dogfood 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 made changes -
            Link This issue is related to JENKINS-33254 [ JENKINS-33254 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 161714 ] JNJira + In-Review [ 196848 ]
            benapgar Ben Apgar made changes -
            Link This issue relates to JENKINS-25681 [ JENKINS-25681 ]
            benapgar Ben Apgar made changes -
            Link This issue relates to JENKINS-8539 [ JENKINS-8539 ]

              People

              • Assignee:
                ikedam ikedam
                Reporter:
                ikedam ikedam
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: