Repository navigation
Fix double escaping of Google Scholar metadata - #15047
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Pass plain citation values to the DOM so it escapes the final attributes once. Preserve titles, author names, explicit citation metadata, URLs, and nested reference values after serialization. Refs quarto-dev#12452
2be2e9f to
e8211e2
Compare
tests/utils.ts already provides the temp directory create/cleanup pattern, so the reference test uses it instead of its own try/finally.
cderv
left a comment
There was a problem hiding this comment.
Thanks for the fix! I reverted only the source change and the new unit tests and the smoke-all document all fail on their assertions, then pass with the fix.
I'll push a small commit on your branch before merging, so that the test in tests/unit/scholar-metadata.test.ts uses the withTempDir() helper from tests/utils.ts instead of its own try/finally.
For the record, the example from #12452 now shows as the literal text in citation_title, because the CSL title is the raw markdown string (emph stays as is too). The appendix citation and BibTeX have the same problem, so this is separate from the escaping and we'll follow up on it in another PR.
Description
I encountered some trouble with quarto escaping metadata fro google scholar twice. With this PR, quarto passes plain citation values to the DOM so it escapes the final attributes once.
Refs: #12452
Checklist
I have (if applicable):
AI-assisted PR