Commit 1f093dd8 authored by Lauris's avatar Lauris

fix: regex replaces everything that is not alphanum, - or _

parent 12cf47d6
...@@ -3198,7 +3198,7 @@ ...@@ -3198,7 +3198,7 @@
/*-- Event Handling --*/ /*-- Event Handling --*/
function getTargetSelectorSuffix(targetId) { function getTargetSelectorSuffix(targetId) {
return targetId ? '-' + targetId.replace(/\./g, '\\.') : ''; return targetId ? '-' + targetId.replace(/([^a-zA-Z0-9-_])/g, '-') : '';
} }
function getTargetSelector(targetId) { function getTargetSelector(targetId) {
return '.target' + getTargetSelectorSuffix(targetId); return '.target' + getTargetSelectorSuffix(targetId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment