Skip to content

Commit

Permalink
fix(message): add DOMPurify to sanitize message
Browse files Browse the repository at this point in the history
add conditional loading of message js libs
  • Loading branch information
ajmacdonald committed Oct 28, 2024
1 parent e3f692d commit bc0c9fd
Show file tree
Hide file tree
Showing 5 changed files with 1,575 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/webapp/resources/jsp/load_js.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ String rtl_js = (String) request.getAttribute("rtl");
<script type="text/javascript" src="<%= base_js %>/resources/jquery/current/jquery.min.js"></script>
<script type="text/javascript" src="<%= base_js %>/resources/jquery/current/jquery-ui.min.js"></script>

<%
String showServerMessage = System.getProperty("org.voyanttools.server.showservermessage");
if (showServerMessage != null && showServerMessage.equals("true")) {
%>
<!-- showdown -->
<script type="text/javascript" src="<%= base_js %>/resources/showdown/showdown.min.js"></script>

<!-- purify -->
<script type="text/javascript" src="<%= base_js %>/resources/purify/purify.min.js"></script>
<% } %>

<!-- D3 -->
<script type="text/javascript" src="<%= base_js %>/resources/d3/current/d3.min.js"></script>
<script type="text/javascript" src="<%= base_js %>/resources/d3/fisheye.js"></script>
Expand Down
Loading

0 comments on commit bc0c9fd

Please sign in to comment.