KEYCLOAK-3259 Specify UTF-8 encoding for freemarker template files

This commit is contained in:
Hiroyuki Wada 2016-07-04 17:41:35 +09:00
parent 450b57c76a
commit 00cb0a798a

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 {