STIXProject / stix-to-html

Convert STIX XML to HTML
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

document.querySelector() fails when ids include periods #75

Closed bworrell closed 9 years ago

bworrell commented 9 years ago

If an id in the STIX content contains a period ., then the stix-to-html javascript logs errors regarding document.querySelector().

In testing, I resolved this by escaping the periods before passing it to the querySelector() method (much like what is done with : characters).

some_id = some_id.split(".").join("\\.").;