fixed character encoding bug
This commit is contained in:
@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -40,6 +41,7 @@ public abstract class TemplateServlet extends HttpServlet {
|
||||
var template = templates.getInstanceOf(path);
|
||||
if (template != null){
|
||||
try {
|
||||
resp.setCharacterEncoding("UTF-8");
|
||||
template.add("data",data);
|
||||
resp.getWriter().println(template.render());
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user