pinterest 分享描述中的标签

Hashtag in pinterest share description

我正在尝试在我的页面上使用 pinterest 设置社交分享。它工作正常,除了主题标签似乎没有出现。

我赶紧凑了个jsfiddle with my code。如您所见,我在描述中放置了一个主题标签,但是当弹出共享框时,它完全省略了标签。

<a onclick="return !window.open(this.href, 'Share on Pinterest', 'width=640, height=536')" 
href="http://pinterest.com/pin/create/button/?
url=http://google.com&media=http://dummyimage.com/600x400/000/fff&description=this is a #hashtag" 
class="pin-it-button" count-layout="horizontal"> 
<img src="https://cdn.shopify.com/s/files/1/0636/3475/files/pinterest_e8e717fe-0b0d-4a38-8290-5c5beb871dd4.png?9971" width=22/></a>

有谁知道如何在描述中添加主题标签并使其发挥作用?我尝试使用

感谢您的帮助!

尝试用主题标签的 HTML 字符替换“#”:

&#35;

您需要对 URL 的 # 进行编码 - 将其替换为 %23,您将获得所需的结果 - Fiddle

<a onclick="return !window.open(this.href, 'Share on Pinterest', 'width=640, height=536')" href="http://pinterest.com/pin/create/button/?url=http://google.com&media=http://dummyimage.com/600x400/000/fff&description=this is a %23hashtag" class="pin-it-button" count-layout="horizontal">
   <img src="https://cdn.shopify.com/s/files/1/0636/3475/files/pinterest_e8e717fe-0b0d-4a38-8290-5c5beb871dd4.png?9971" width=22/>
</a>