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

Twitter sharing html tags #31

Closed
aosmichenko opened this issue Dec 24, 2013 · 4 comments
Closed

Twitter sharing html tags #31

aosmichenko opened this issue Dec 24, 2013 · 4 comments
Labels
[Feature] Sharing Post sharing, sharing buttons [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@aosmichenko
Copy link

Hello everyone,

I have found an issue or maybe it's not, but when you are trying to share post via twitter it doesn't esc html for example: http://okmagazine.com/dress-up/trend-to-try/ok-look-of-the-day-mariah-careys-santa-baby-style/ try to share on twitter.

I have found where it creates sharing text :/modules/sharedaddy/sharing-sources.php
on line 412-417 code says:

if ( 140 < $strlen( $post_title ) + $suffix_length ) {
// The -1 is for "\xE2\x80\xA6", a UTF-8 ellipsis.
$text = $substr( $post_title, 0, 140 - $suffix_length - 1 ) . "\xE2\x80\xA6";
} else {
$text = $post_title;
}

What if we use strip_tags() http://www.php.net/strip_tags function to remove them, I have seen many times, when people add to the wordpress post's and page's titles.

Thanks, Alex.

@georgestephanis
Copy link
Member

Aha, good call. I'm not quite sure if that's the best place to fix the issue, but it should be a relatively simple fix. Let me check -- one moment.

@aosmichenko
Copy link
Author

Good way, I didn't find this function in codex(

@nb
Copy link
Member

nb commented Dec 27, 2013

We should also try to convert HTML entities to Unicode characters. I recently noticed an HTML-encoded em dash in a tweet.

@aosmichenko
Copy link
Author

#32

leogermani pushed a commit that referenced this issue Aug 12, 2022
Improve e-mails by replacing site_url with home_url and manually constructed admin_url with the proper function.
tbradsha pushed a commit that referenced this issue Apr 17, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Sharing Post sharing, sharing buttons [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

No branches or pull requests

3 participants