mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
Rudimentary anchor name escaping
This commit is contained in:
parent
292ce6e12b
commit
e1de4e384a
@ -122,7 +122,7 @@
|
|||||||
|
|
||||||
scrollContainerToAnchor: function ($container, anchorName) {
|
scrollContainerToAnchor: function ($container, anchorName) {
|
||||||
// TODO: Generic issue -> we probably should escape attribute value selectors!?
|
// TODO: Generic issue -> we probably should escape attribute value selectors!?
|
||||||
var $anchor = $("a[name='" + anchorName + "']", $container);
|
var $anchor = $("a[name='" + anchorName.replace(/'/, '\\\'') + "']", $container);
|
||||||
if ($anchor.length) {
|
if ($anchor.length) {
|
||||||
$container.scrollTop(0);
|
$container.scrollTop(0);
|
||||||
$container.scrollTop($anchor.first().position().top);
|
$container.scrollTop($anchor.first().position().top);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user