Browse Source

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

pull/80/head
Lauris 11 years ago
parent
commit
1f093dd821
  1. 2
      c3.js

2
c3.js

@ -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);

Loading…
Cancel
Save