Skip to content

Decode HTML entities in CSL text fields - #2986

Merged
agoose77 merged 2 commits into
jupyter-book:mainfrom
stefanv:fix/decode-html-entities-in-csl-fields
Aug 4, 2026
Merged

Decode HTML entities in CSL text fields#2986
agoose77 merged 2 commits into
jupyter-book:mainfrom
stefanv:fix/decode-html-entities-in-csl-fields

Conversation

@stefanv

@stefanv stefanv commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

CrossRef's CSL-JSON metadata sometimes contains HTML entities in title and journal name fields.

Thanks to @jarrodmillman for the report.

@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2a16e87

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
citation-js-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the bug Something isn't working label Jul 3, 2026
CrossRef's CSL-JSON metadata sometimes contains HTML entities
in title and journal name fields.
@stefanv
stefanv force-pushed the fix/decode-html-entities-in-csl-fields branch from 517c31f to 4f086c0 Compare July 3, 2026 06:11

@choldgraf choldgraf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test looks good to me - if I understand, this won't change anything for the vast majority of cases but now if there html stuff in the metadata, it'll get converted into a sensible character.

One double check: there's no native html decode we could use? The "he" package is the most lightweight way here? Just double checking before we add a new dep but if you think it's the right decision imo, go ahead and merge!

@stefanv

stefanv commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

That's a good question, Chris; I'm not sure — it didn't look like any of other pre-existing deps did it, and it's a bit surprising that there's no "batteries included" solution. Maybe @agoose77 or @fwkoch knows of something?

@agoose77
agoose77 merged commit 4f12f1b into jupyter-book:main Aug 4, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants