Plugin Directory


Opened 5 years ago

Closed 5 years ago

#1591 closed defect (worksforme)

Custom Sharing Doesn't Produce The Correct Link

Reported by: edent Owned by: mdawaffe
Priority: normal Severity: normal
Plugin: jetpack Keywords:


I've added a custom link. The title and icon appear, but the URL is


The issue appears to be at

At the moment, it's:

$str = $this->get_link( get_permalink( $post->ID ), esc_html( $this->name ), ( 'Click to share', 'jetpack' ), 'share='.$this->id );

It should be doing something like:
$url = str_replace( '&', '&', $this->url );

$url = str_replace( '%post_url%', rawurlencode( $this->get_share_url( $post->ID ) ), $url );
$url = str_replace( '%post_full_url%', rawurlencode( get_permalink( $post->ID ) ), $url );
$url = str_replace( '%post_title%', rawurlencode( $post->post_title ), $url );
$str = $this->get_link( $url, esc_html( $this->name ), ( 'Click to share', 'jetpack' ), 'share='.$this->id );

Change History (1)

comment:1 @mdawaffe5 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Everything works for me.

Make sure you're using %post_url% instead of [posturl] in your Custom Service's "Sharing URL".

Note: See TracTickets for help on using tickets.