Skip to content

Commit

Permalink
Fix code scanning alert issue-OWASP-BLT#1346
Browse files Browse the repository at this point in the history
  • Loading branch information
JisanAR03 committed Oct 25, 2023
1 parent ffee730 commit f060432
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/templates/hunt_submittion.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,18 @@ <h1 class="title">Report a bug</h1>
{% endif %}
</table>
<script type="text/javascript">
function sanitizeInput(input) {
var div = document.createElement('div');
div.appendChild(document.createTextNode(input));
return div.innerHTML;
}
$(function () {
$('button[name="test_files"]').on('click', function () {
$(this).parent().find('input[type=file]').click();
});
$('input[name="screenshot"]').on('change', function () {
var file = $(this).val().replace('C:\\fakepath\\', '');
file = sanitizeInput(file);
$(this).parent().find('.badge').html(file);
});
$(".duplicates").click(function () {
Expand Down

0 comments on commit f060432

Please sign in to comment.