Skip to content

Commit 4b03a3d

Browse files
committed
Merge branch '2.3.x' into 2.4.x
2 parents 7ebbf85 + 3210c8c commit 4b03a3d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/converters/JSONConverterTests.groovy

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,19 @@ class JSONConverterTests extends AbstractGrailsControllerTests {
129129

130130
assertEquals('{"line":"first line \\n second line"}', result.toString())
131131
}
132+
133+
// GRAILS-11530
134+
void testMoreStringsWithQuotes() {
135+
def str = 'Hi, this is my "test"'
136+
def json = new grails.converters.JSON([a:str])
137+
assertEquals('{"a":"Hi, this is my \\"test\\""}', json.toString())
138+
139+
}
140+
141+
// GRAILS-11517
142+
void testMoreStringsWithQuotes2() {
143+
assertEquals('{"key":"<a href=\\"#\\" class=\\"link\\">link<\\u002fa>"}',(['key': '<a href="#" class="link">link</a>'] as JSON).toString())
144+
}
132145

133146
void onSetUp() {
134147
GroovySystem.metaClassRegistry.removeMetaClass Errors

0 commit comments

Comments
 (0)