Skip to content

Commit

Permalink
[KNOWAGE-6438] - Added escaping for doc description special chars
Browse files Browse the repository at this point in the history
  • Loading branch information
matmassa committed Feb 11, 2022
1 parent 9dec45c commit 2a54f27
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<%@page import="org.json.JSONObject"%>
<%@page import="java.util.regex.Matcher"%>
<%@page import="java.util.regex.Pattern"%>

<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
<script>

var sbiM=angular.module('sbiModule',["ngSanitize"]);
Expand Down Expand Up @@ -851,7 +851,7 @@ sbiM.factory('sbiModule_cockpitDocument', function(){
docId: <%= docId %>,
docLabel: '<%= docLabel %>',
docName: '<%= docName.replaceAll(Pattern.quote("'"), Matcher.quoteReplacement("\\'")) %>',
docDescription: '<%= docDescription %>'
docDescription: '<%= StringEscapeUtils.escapeJavaScript(docDescription) %>'
}
});

Expand Down

0 comments on commit 2a54f27

Please sign in to comment.