Skip to content

Commit

Permalink
Merge pull request #846 from support-project/issue845_escape_template
Browse files Browse the repository at this point in the history
#845 Add html escape for template information
  • Loading branch information
koda-masaru authored Sep 9, 2017
2 parents 4e40939 + 152e478 commit 6d5075c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%@page import="org.support.project.common.util.HtmlUtils"%>
<%@page pageEncoding="UTF-8" isELIgnored="false" session="false" errorPage="/WEB-INF/views/commons/errors/jsp_error.jsp"%>
<%@page import="java.io.PrintWriter"%>
<%@page import="org.support.project.common.util.StringUtils"%>
Expand Down Expand Up @@ -40,11 +41,11 @@
}
builder.append(" />");
if (!StringUtils.isEmpty(template.getTypeIcon())) {
builder.append("<i class=\"fa ").append(template.getTypeIcon()).append("\" ></i>&nbsp;");
builder.append("<i class=\"fa ").append(HtmlUtils.escapeHTML(template.getTypeIcon())).append("\" ></i>&nbsp;");
} else {
builder.append("<i class=\"fa fa-edit\"></i>&nbsp;");
}
builder.append(template.getTypeName());
builder.append(HtmlUtils.escapeHTML(template.getTypeName()));
%>
<%= builder.toString() %>
</label>
Expand Down

0 comments on commit 6d5075c

Please sign in to comment.