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

DSLD / GDSL needs to escape single quotes in documentation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: workflow-cps-plugin
    • Labels:
      None
    • Environment:
      workflow-cps: 2.18
      pipeline-model-definition: 0.2
      Jenkins: 2.23
    • Similar Issues:

      Description

      The Pipeline Model Definition plugin has a step whose display name includes single quotes.

      This causes a syntax error when using the generated DSLD / GDSL, as the single quotes (here, around "FOO=bar") are unescaped when the doc field is written:

      method(name: 'envVarsForTool', type: 'Object', namedParams: [parameter(name: 'toolId', type: 'java.lang.String'), parameter(name: 'toolVersion', type: 'java.lang.String'), ], doc: 'Fetches the environment variables for a given tool in a list of 'FOO=bar' strings suitable for the withEnv step.')
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            .gitignore
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/dsld.groovy
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/gdsl.groovy
            src/test/java/org/jenkinsci/plugins/workflow/testMetaStep/DisplaynameWithEscapeCharState.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/7273d777e9ea119d0d25f42e5534dd71c1c65583
            Log:
            Merge pull request #84 from DealerDotCom/master

            [FIXED JENKINS-38551] Escape invalid chars in gdsl generation

            Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/382cf9b45270...7273d777e9ea

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: .gitignore src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/dsld.groovy src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/gdsl.groovy src/test/java/org/jenkinsci/plugins/workflow/testMetaStep/DisplaynameWithEscapeCharState.java http://jenkins-ci.org/commit/workflow-cps-plugin/7273d777e9ea119d0d25f42e5534dd71c1c65583 Log: Merge pull request #84 from DealerDotCom/master [FIXED JENKINS-38551] Escape invalid chars in gdsl generation Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/382cf9b45270...7273d777e9ea

              People

              • Assignee:
                rishimanidhar Rishi Manidhar
                Reporter:
                orrc Christopher Orr
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: