Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-6
-
None
-
Fedora core 3, JDK 1.5
Description
A single-line string used as an attribute is escaped by MarkupBuilder; a multi-line string isn't.
For example:
import groovy.xml.*
MarkupBuilder builder = new MarkupBuilder()
builder.test
{
def multi = '''
Jon & Co
'''
def single = 'Jon & Co'
inner (multi:multi, single:single)
}
produces:
<test>
<inner multi='
Jon & Co
' single='Jon & Co' />
</test>