Skip to content

Commit 3210c8c

Browse files
committed
GRAILS-11517 add test
1 parent c0535c5 commit 3210c8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ class JSONConverterTests extends AbstractGrailsControllerTests {
138138
def str = 'Hi, this is my "test"'
139139
def json = new grails.converters.JSON([a:str])
140140
assertEquals('{"a":"Hi, this is my \\"test\\""}', json.toString())
141+
142+
}
143+
144+
// GRAILS-11517
145+
void testMoreStringsWithQuotes2() {
146+
assertEquals('{"key":"<a href=\\"#\\" class=\\"link\\">link<\\u002fa>"}',(['key': '<a href="#" class="link">link</a>'] as JSON).toString())
141147
}
142148

143149
void onSetUp() {

0 commit comments

Comments
 (0)