The purpose of this project is to demonstrate an encoding problem introduced in grails 4.0.4.
In general, this is a blank application using all defaults. It was created with grails create-app
.
- index.gsp - This should output "Test(line break)String"
- gradle.properties - Change version from 4.0.3 to 4.0.4 to reproduce problem
- DemoCodec - A simple codec that outputs HTML
- application.yml - Sets default output encoding around line 78
Change grails version in gradle.properties. No other changes are needed.
- Run the application with
run-app
and note that the index page shows "Test(line break)String" on two lines. The HTML output from the codec is not encoded. - Run gradle tasks
clean
(just to be sure) andassemble
. Run the resulting jar. Note that the index page shows the same thing as before.
- Same output from
run-app
- When using
clean
,assemble
, and running the resulting jar, the index page output shows the text "Test<br/>String" with the HTML encoded.