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

manager.addShortText requires protection of characters '<' and '>'

XMLWordPrintable

    • groovy-postbuild-2.4.

      manager.addShortText(Text) displays an empty string if <Text> contains characters '<' or '>'.
      As a workaround, one can use: Text.replaceAll('<', '&lt').replaceAll('>', '&gt').

      The fix, on my opinion, is to add .replaceAll('<', '&lt').replaceAll('>', '&gt') inside the function addShortText itself.

      Probably, there are other characters which are not handled properly by the function. This is also desirable to be checked.

            alexander_samoylov Alexander Samoylov
            alexander_samoylov Alexander Samoylov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: