Skip to content

Commit

Permalink
Merge pull request #14 from lordt/master
Browse files Browse the repository at this point in the history
Fix for more entropy in ids. Sometimes dot was a partof id.
  • Loading branch information
pkerspe authored Mar 29, 2019
2 parents 8e9d9e9 + eff5af7 commit 639fd74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ CKEDITOR.plugins.add('collapsibleItem', {
}
var uniqueIdentifier = [
(new Date()).getTime(),
('' + 1e6 * Math.random()).substring(0, 6)
Math.floor(Math.random() * (1e6 - 1e5 - 1)) + 1e5
].join('_');
this.setData('accordionId', accordionid);
this.setData('itemId', 'Collapsible' + uniqueIdentifier);
Expand Down

0 comments on commit 639fd74

Please sign in to comment.