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

Convert description from Markdown when importing from Open Library #2935

Merged
merged 5 commits into from
Aug 6, 2023

Conversation

jderuiter
Copy link
Contributor

The description from Open Library is in Markdown format. When importing from Open Library the description gets sanitised as if it is HTML. This breaks Markdown blockquote as the > gets converted to >. Other Markdown syntax seems to work as the description field seems to be able to handle both Markdown and HTML. Is it the intention to support a mix of Markdown and HTML in the database?

Fixes #2930

Copy link
Member

@mouse-reeve mouse-reeve left a comment

Choose a reason for hiding this comment

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

One small change to sanitize the input, but otherwise looks good!

bookwyrm/connectors/openlibrary.py Show resolved Hide resolved
@jderuiter
Copy link
Contributor Author

jderuiter commented Aug 2, 2023 via email

Copy link
Member

@mouse-reeve mouse-reeve left a comment

Choose a reason for hiding this comment

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

I see! Thank you for clarifying and for the changes!

@mouse-reeve mouse-reeve merged commit 861d3b1 into bookwyrm-social:main Aug 6, 2023
@jderuiter jderuiter deleted the markdown-import branch August 25, 2023 08:32
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.

Importing from OpenLibrary breaks markdown quotes
2 participants