cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

[CAL-1627] Social share previews don't render ampersands

Open milospuac opened this issue 2 years ago • 6 comments

Created via Threads. See full discussion: https://threads.com/34470827863

Screenshot 2023-05-08 at 10.12.17.png

From SyncLinear.com | CAL-1627

milospuac avatar May 08 '23 08:05 milospuac

Hey @milospuac , It seems this thread is not publicly accessible, or am I missing something here?

image

AyushMainali123 avatar May 08 '23 08:05 AyushMainali123

Our thread is private, but I posted the picture which explains the issue. If in your profile description you have "&" symbol, the social preview image won't render it properly.

milospuac avatar May 08 '23 08:05 milospuac

Got it, Thank you for the explanation. I will look into this issue now.

AyushMainali123 avatar May 08 '23 08:05 AyushMainali123

@AyushMainali123 cool, I'll assign it to you. Thanks for contributing 🫡

milospuac avatar May 08 '23 08:05 milospuac

Hey @milospuac , this issue might be caused by NextSeo component we are using (imported from 'next-seo') inside HeadSeo component.

I have console logged the props that is sent to NextSEO. The props that is being passed to the NextSeo is not being convert into that entity.

image image

But the preview was correctly rendered in my local build.

I used Social Share Preview Chrome Extension to test the issue. image

AyushMainali123 avatar May 08 '23 09:05 AyushMainali123

@sean-brydon @milospuac ,

Could you please verify this behavior? If it's correct, we can create a workaround by replacing & with and. However, for other HTML entities, such as ', we may not have any alternatives except to contact the team responsible for creating the library.

Please let me know if my diagnosis is wrong or if I am missing something here.

Thank you!

AyushMainali123 avatar May 09 '23 08:05 AyushMainali123