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

Add transform.Plainify to the summary body content of the share links #758

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

melroy89
Copy link
Contributor

@melroy89 melroy89 commented Oct 22, 2024

You definitely want to add Plainify transformer first, because the body content will become a HTML encoding mess. I left HTMLEscape there as well, just be sure for security reasons. But if you want, I can remove the second transformer.

Like a tweet on X will look like this:

image

After implementing transform.Plainify, it will look much better:

image

(ignore the red, I don't have X premium pro blabla, it's red because I hit the max limit of chars)

Signed-off-by: Melroy van den Berg <melroy@melroy.org>
melroy89 referenced this pull request Oct 22, 2024
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for ananke-theme ready!

Name Link
🔨 Latest commit c4ae100
🔍 Latest deploy log https://app.netlify.com/sites/ananke-theme/deploys/6717d39333891e00080908af
😎 Deploy Preview https://deploy-preview-758--ananke-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@davidsneighbour
Copy link
Collaborator

The HTMLEscape is there so that special characters are escaped. There is a function urlize that might be suited better than that? I'll merge it and add some testing for it later.

@davidsneighbour davidsneighbour merged commit 2cfb09e into theNewDynamic:main Oct 23, 2024
4 checks passed
@melroy89 melroy89 deleted the patch-7 branch October 24, 2024 08:55
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.

2 participants