Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix image description unnecessarily html-escaping innocent characters #321

Merged
merged 2 commits into from
Nov 22, 2021

Conversation

tsmethurst
Copy link
Contributor

This PR implements a SanitizeCaption function in the text formatter for processing image descriptions. It's similar to other text-formatting functions in that package, but it doesn't format text into html, it just preformats, unescapes, and postformats.

This resolves an issue where characters like ' were being HTML-escaped in image captions, which led to weird-looking alt-text.

Closes #305

@tsmethurst tsmethurst merged commit 24f9e11 into main Nov 22, 2021
@tsmethurst tsmethurst deleted the image_caption_escape_fix branch November 22, 2021 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Innocuous characters getting html-escaped in image captions
1 participant