Merge pull request #2994 from wadahiro/KEYCLOAK-3259

KEYCLOAK-3259 Specify UTF-8 encoding for freemarker template files
This commit is contained in:
Stian Thorgersen 2016-07-04 19:25:03 +02:00 committed by GitHub
commit 435cdb6180

View file

@ -68,7 +68,7 @@ public class FreeMarkerUtil {
private Template getTemplate(String templateName, Theme theme) throws IOException {
Configuration cfg = new Configuration();
cfg.setTemplateLoader(new ThemeTemplateLoader(theme));
return cfg.getTemplate(templateName);
return cfg.getTemplate(templateName, "UTF-8");
}
class ThemeTemplateLoader extends URLTemplateLoader {