mirror of
https://github.com/sb745/NyaaV3.git
synced 2025-12-23 12:45:46 +02:00
Incomplete multi-character sanitization fix
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
d94a7e1864
commit
5bb38ce959
1 changed files with 4 additions and 2 deletions
6
nyaa/static/js/bootstrap-select.js
vendored
6
nyaa/static/js/bootstrap-select.js
vendored
|
|
@ -804,8 +804,10 @@
|
||||||
title = typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText;
|
title = typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText;
|
||||||
}
|
}
|
||||||
|
|
||||||
//strip all HTML tags and trim the result, then unescape any escaped tags
|
//strip all HTML tags in a DOM-safe way and trim the result, then unescape any escaped tags
|
||||||
this.$button.attr('title', htmlUnescape($.trim(title.replace(/<[^>]*>?/g, ''))));
|
var $tmp = $('<div>').html(title);
|
||||||
|
var plainTitle = $tmp.text();
|
||||||
|
this.$button.attr('title', htmlUnescape($.trim(plainTitle)));
|
||||||
this.$button.children('.filter-option').html(title);
|
this.$button.children('.filter-option').html(title);
|
||||||
|
|
||||||
this.$element.trigger('rendered.bs.select');
|
this.$element.trigger('rendered.bs.select');
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue