Skip to content

Commit

Permalink
Fixes: #1391 (#1392)
Browse files Browse the repository at this point in the history
  • Loading branch information
kziemianek authored and mbeacom committed Jun 7, 2018
1 parent 9494da2 commit 14d2737
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
6 changes: 1 addition & 5 deletions app/assets/v2/js/pages/bounty_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,7 @@ var callbacks = {
'issue_description': function(key, val, result) {
var converter = new showdown.Converter();

val = val.replace(/script/ig, 'scr_i_pt');
var ui_body = val;

ui_body = converter.makeHtml(ui_body);

ui_body = converter.makeHtml(val);
return [ 'issue_description', ui_body ];
},
'bounty_owner_address': address_ize,
Expand Down
2 changes: 2 additions & 0 deletions app/assets/v2/js/purify.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/v2/js/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ var sanitize = function(str) {
if (typeof str != 'string') {
return str;
}
result = str.replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
result = DOMPurify.sanitize(str);
return result;
};

Expand Down
1 change: 1 addition & 0 deletions app/retail/templates/shared/footer_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<script src="{% static "v2/js/jquery.validate.min.js" %}"></script>
<script src="{% static "v2/js/jsrender.js" %}"></script>
<script src="{% static "v2/js/base.js" %}"></script>
<script src="{% static "v2/js/purify.min.js" %}"></script>
<script src="{% static "v2/js/shared.js" %}"></script>
<script src="{% static "v2/js/work_with_gitcoin.js" %}"></script>
<script src="{% static "v2/js/animate.min.js" %}"></script>
Expand Down

0 comments on commit 14d2737

Please sign in to comment.