-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set output_encoding in FreeMarkerView implementations
According to the official FreeMarker documentation, Spring's FreeMarkerView implementations should be configuring the output_encoding for template rendering. To address that, this commit modifies the FreeMarkerView implementations in Web MVC and WebFlux to explicitly set the output_encoding for template rendering. See https://freemarker.apache.org/docs/pgui_misc_charset.html#autoid_53 See gh-33071 Closes gh-33106
- Loading branch information
Showing
7 changed files
with
71 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
...g-webflux/src/test/resources/org/springframework/web/reactive/config/index_ISO-8859-1.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
<html><body>${hello}, Java Café</body></html> | ||
<html> | ||
<body> | ||
<h1>${hello}, Java Café</h1> | ||
<p>output_encoding: ${.output_encoding}</p> | ||
</body> | ||
</html> |
7 changes: 6 additions & 1 deletion
7
spring-webflux/src/test/resources/org/springframework/web/reactive/config/index_UTF-8.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
<html><body>${hello}, Java Café</body></html> | ||
<html> | ||
<body> | ||
<h1>${hello}, Java Café</h1> | ||
<p>output_encoding: ${.output_encoding}</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
...vc/src/test/resources/org/springframework/web/servlet/config/annotation/WEB-INF/index.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
<html><body>${hello}, Java Café</body></html> | ||
<html> | ||
<body> | ||
<h1>${hello}, Java Café</h1> | ||
<p>output_encoding: ${.output_encoding}</p> | ||
</body> | ||
</html> |