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

Parse HTML from mastdon and friendica posts for creating titles #2709

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

Kradyz
Copy link
Contributor

@Kradyz Kradyz commented Feb 5, 2023

The contents from mastodon and friendica posts are delivered in HTML format. The title is generated by taking the first sentence, but the HTML tags remain visible and prevent the lines from being split. Converting the HTML into markdown allows the title to be generated correctly.

Fixes #2686
Previous related PR with a different strategy that was closed by error is #2690

Known issues:

  • The markdown is rendered in the title, and the invisible markdown characters will count towards the MAX_TITLE_LENGTH.

@Nutomic Nutomic merged commit ab9b60e into LemmyNet:main Feb 7, 2023
Nutomic pushed a commit that referenced this pull request Feb 20, 2023
Co-authored-by: Kradyz <k@radiz.nl>
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.

Titles are not generated correctly when posting from Mastodon
3 participants