-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regressionA bug that is also a regression
Milestone
Description
Kaj Hejer opened SPR-16951 and commented
After updating to Spring 5 all output from Spring freemarker macros are escaped. In <@spring
.message> the message is escaped and in <@spring
.formRadioButtons> the separator attribute is escaped f.x. "<br/>".
This has been discussed at https://stackoverflow.com/questions/50871832/spring-5-and-escaping-in-springs-freemarker-macros
Config:
@Bean
public FreeMarkerConfigurer freeMarkerConfigurer() {
FreeMarkerConfigurer config = new FreeMarkerConfigurer();
config.setTemplateLoaderPath("/WEB-INF/templates/ftl/");
Properties props = new Properties();
props.put("template_update_delay", getFreemarkerUpdateDelay());
props.put("template_exception_handler", getFreemarkerExceptionHandler());
props.put("url_escaping_charset", WebConstants.CHAR_SET_UTF_8);
config.setFreemarkerSettings(props);
config.setDefaultEncoding(WebConstants.CHAR_SET_UTF_8);
return config;
}
We use Freemarker 2.3.28 and Spring 5.0.7.RELEASE
Affects: 5.0.7
Issue Links:
- spring.ftl doesn't work on freemarker 2.3.24+'s auto escaping feature [SPR-14740] #19306 spring.ftl doesn't work on freemarker 2.3.24+'s auto escaping feature
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regressionA bug that is also a regression