Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1418

MarkupBuilder does not escape element content correctly if it contains EOL sequences

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-6
    • 1.0-RC-1
    • None
    • None

    Description

      MarkupBuilder does not correctly escape element content that contains end of line characters/sequences. For example, the following:

      def b = new MarkupBuilder()
      b.element("""test
      <<
      """)

      will generate XML that looks like this:

      <element>test
      <<
      </element>

      Note that the "<<" sequence in the XML should be "<<".

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            guillaume Guillaume Sauthier
            pledbrook Peter Ledbrook
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment