Skip to content

Commit

Permalink
[#8534] fix some codeql warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
brondsem authored and webjunkie01 committed Jan 9, 2024
1 parent ab11a7c commit 1733ec7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
var selector = activePalette,
selectorParent = $(event.target).parents("#" + selector.attr('id')).length;

if (event.target === $(selector)[0] || event.target === selectorOwner || selectorParent > 0) {
if (event.target === $.find(selector)[0] || event.target === selectorOwner || selectorParent > 0) {
return;
}

Expand Down
5 changes: 3 additions & 2 deletions Allura/allura/templates/repo/commit.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@
{{ super() }}
<script type="text/javascript">
function color_diff(selector) {
var overflow = $(selector).find("pre").get(0);
var $selected = $('body').find(selector);
var overflow = $selected.find("pre").get(0);
var len = overflow.scrollWidth - 5;
$(selector).find(".gi, .gd, .gu").width(len);
$selected.find(".gi, .gd, .gu").width(len);
}

function ld(diff, callback) {
Expand Down
2 changes: 1 addition & 1 deletion ForgeImporters/forgeimporters/github/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def _get_attachments(self, extractor, body):
# at github, attachments are images only and are included into comment's body
# usual syntax is
# ![cdbpzjc5ex4](https://f.cloud.github.com/assets/979771/1027411/a393ab5e-0e70-11e3-8a38-b93a3df904cf.jpg)\r\n
REGEXP = r'!\[[\w0-9]+?\]\(((?:https?:\/\/)?[\da-z\.-]+\.[a-z\.]{2,6}'\
REGEXP = r'!\[[\w]+?\]\(((?:https?:\/\/)?[\da-z\.-]+\.[a-z\.]{2,6}'\
'[\\/%\\w\\.-]*.(jpg|jpeg|png|gif))\\)[\r\n]*'
attachments = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $(function(){
}

$checked.each(function() {
$form.append('<input type="hidden" name="__ticket_ids" value="'+$(this).val()+'"/>');
$form.append('<input type="hidden" name="__ticket_ids" value="'+escape_html($(this).val())+'"/>');
});
});
});

0 comments on commit 1733ec7

Please sign in to comment.