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

Smart/Curly Quotes Problem (Plus Emojis) #508

Open
parrycarry opened this issue Nov 29, 2022 · 1 comment
Open

Smart/Curly Quotes Problem (Plus Emojis) #508

parrycarry opened this issue Nov 29, 2022 · 1 comment

Comments

@parrycarry
Copy link

parrycarry commented Nov 29, 2022

I ran across this issue during my testing. I've already added a fix on my end for the quotes, but I figured I'd shed some light on it, perhaps this will help someone else out. This is happening with embed 3.x version... so maybe it isn't an issue in embed 4, but I can't test for that cause the demo page user agent isn't set to the facebook one, so Twitter doesn't return anything. Maybe the problem is Twitter, but I can't really reproduce this.

Anyway, here are some links, using the demo.php page, only adding the new user agent to the dispatcher:

https://api.parrycarry.com/test.php?url=https%3A%2F%2Ftwitter.com%2Fflexinja%2Fstatus%2F1597445652166103040

This one seems to make the smart quotes convert into “ ” and ’, and I assume вЂ˜ is the other apostrophe version when Googling. I've already added a conversion function for this. Twitter descriptions by default all have smart quotes enclosing the actual description, so this should happen to all Tweets, but it doesn't.

https://api.parrycarry.com/test.php?url=https%3A%2F%2Ftwitter.com%2Fflexinja%2Fstatus%2F1595891254155427840

This is from the same person, using the same smart apostrophes, and it doesn't have this problem at all.

https://api.parrycarry.com/test.php?url=https%3A%2F%2Ftwitter.com%2FEevohhh%2Fstatus%2F1597470048033312771

Here is another Tweet from someone else, and it has the same problem again. It also converts the heart 💖 emoji into рџ’–. I haven't added a conversion for this, however, as I just found it.

https://api.parrycarry.com/test.php?url=https%3A%2F%2Ftwitter.com%2Fiamchrisjudge%2Fstatus%2F1597439017448243200

Which is strange cause here is another Tweet with emojis that don't do that.

So, I am not sure what could possible cause this to happen. Sometimes things get converted, and sometimes they don't.

@parrycarry
Copy link
Author

I have upgraded to the latest version of Embed via Composer, and this problem is in fact gone. This seems to be strictly an Embed 3.x issue.

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

No branches or pull requests

1 participant