Skip to content

Commit

Permalink
Append non-numeric character to all generated citationIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Oct 30, 2016
1 parent 51bb1a3 commit e5c6ae2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/util_integration.js
Expand Up @@ -9,7 +9,10 @@ CSL.Engine.prototype.setCitationId = function (citation, force) {
while (true) {
direction = 0;
if (!this.registry.citationreg.citationById[id]) {
citation.citationID = id.toString(32);
// In case the ID is used as an HTML identifier in the
// calling application.
// https://github.com/Juris-M/citeproc-js/issues/22
citation.citationID = "a" + id.toString(32);
break;
} else if (!direction && id < 50000000000000) {
direction = 1;
Expand Down

0 comments on commit e5c6ae2

Please sign in to comment.