Skip to content

Commit

Permalink
Fix XSS while prepending html
Browse files Browse the repository at this point in the history
  • Loading branch information
uzairr authored and AdditionalPylons committed Aug 7, 2020
1 parent 6143852 commit 072076a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions themes/stanford-style/lms/templates/static_templates/tos.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## mako
<%page expression_filter="h"/>
<%!
from django.utils.translation import ugettext as _
%>
Expand Down Expand Up @@ -27,6 +28,7 @@ <h2 id="copyright">${_('Copyright')}</h2>
<script>
$(document).ready(function() {
var print_tos = '<input type="button" value="Print Terms of Service" class="print">';
// xss-lint: disable=javascript-jquery-prepend, javascript-jquery-append
$('#content section.tos').prepend(print_tos).append(print_tos);
$('#content section.tos input.print').click(function() {
window.print();
Expand Down

0 comments on commit 072076a

Please sign in to comment.