Can't use html share button with pipe | in article title

tweetbutton

#1

Hello, how do I make it so I can share an article with a pipe in the title. For example,

Former Trump Advisers Offering ‘Tweet Risk’ Protection | Morning Joe | MSNBC

After pressing the share button, the window with the url below doesn’t show anything, it’s blank.

https://twitter.com/share?url=https://us-gov.blogspot.com/2017/03/former-trump-advisers-offering-tweet_14.html&text=Former%20Trump%20Advisers%20Offering%20'Tweet%20Risk'%20Protection%20|%20Morning%20Joe%20|%20MSNBC

I’m using Blogger and have this in the code


<!-- Sharingbutton Twitter -->
                                    <a aria-label='' class='resp-sharing-button__link' expr:href='&quot;https://twitter.com/share?url=&quot; + data:post.url + &quot;&amp;text=&quot; + data:post.title' rel='nofollow' target='_blank'>

#2

I think this is something to do with the markup. I built this simple / minimal example:

<html>
	<head></head>
	<body><a href="https://twitter.com/share?url=https://us-gov.blogspot.com/2017/03/former-trump-advisers-offering-tweet_14.html&text=Former%20Trump%20Advisers%20Offering%20%27Tweet%20Risk%27%20Protection%20|%20Morning%20Joe%20|%20MSNBC" class="data-share-button">wibble</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></body>
</html>

That seems to work fine, so I don’t think this is to do with the pipe | character - not sure what is missing from your page.


#3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.