zotero / citeproc-rs

CSL processor in Rust.
https://cormacrelf.github.io/citeproc-wasm-demo/
Other
75 stars 11 forks source link

Invalid HTML produced when item URL contains a quotation symbol `"`. #123

Closed adomasven closed 3 years ago

adomasven commented 3 years ago

When producing the bibliography with APA, with an item that has an URL field with a " symbol in it, the output is

“Title.” n.d. Accessed July 26, 2021. <a href="http://example.com/?"">http:&#x2f;&#x2f;example.com&#x2f;?&quot;</a>.

The quotation symbol in the href field should be escaped in the output.

cormacrelf commented 3 years ago

Turns out you can percent-encode most of these problems away, and this is also how RTF does it (but it is more aggressive, many more % signs). I've roped myself into implementing CSL 1.1 url auto-prefixing as well, but nearly there.