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

Sharing: decode HTML entities in post titles #65

Merged
merged 2 commits into from
Jan 15, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions modules/sharedaddy/sharing-sources.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ public function get_share_url( $post_id ) {

public function get_share_title( $post_id ) {
$post = get_post( $post_id );
$title = apply_filters( 'sharing_title', $post->post_title, $post_id, $this->id );

return apply_filters( 'sharing_title', $post->post_title, $post_id, $this->id );
return html_entity_decode( wp_kses( $title, null ) );
}

public function has_custom_button_style() {
Expand Down Expand Up @@ -389,7 +390,7 @@ public function get_display( $post ) {
}

public function process_request( $post, array $post_data ) {
$post_title = wp_kses( $this->get_share_title( $post->ID ), null );
$post_title = $this->get_share_title( $post->ID );
$post_link = $this->get_share_url( $post->ID );

if ( function_exists( 'mb_stripos' ) ) {
Expand Down