在I.E 9和8中,LinkedIn共享无法正常工作

时间:2015-02-12 11:51:50

标签: html linkedin

我使用LinkedIn分享来分享数据:

http://www.linkedin.com/shareArticle?mini=true&url={articleUrl}&title={articleTitle}&summary={articleSummary}&source={articleSource}

除了没有得到什么问题外,它的工作正常。

DEMO在所有浏览器中工作正常,但同样的事情在浏览器中不起作用。

任何帮助Appriciated

1 个答案:

答案 0 :(得分:1)

问题不在于代码本身或IE,而是生成的链接包含一个让Internet Explorer疯狂的奇怪角色:'(我很惊讶它对其他人起作用)。

因此,您生成的链接是:

https://www.linkedin.com/shareArticle?mini=true&url=www.romans.co.uk%2fRomansImages%2fCMS%2fNewsInsights%2fNews%2fMarraways201410071155325608.jpg&title=A%20September%20to%20remember;%20Romans“%20秒%20largest%20auction%20sale%20this%20年&安培;总结=有%第二十条%20joys%20of%20AN%20Indian%20summer%20spreading%20through%第二十条%20packed%20sales%20房间, %20Romans%20September%20auction%20安培;源= www.romans.co.uk%2fRomansImages%2fCMS%2fNewsInsights%2fNews%2fMarraways201410071155325608.jpg

(注意在那个有趣的角色之后,甚至SO如何打破它)

替换/删除该角色,一切正常:

https://www.linkedin.com/shareArticle?mini=true&url=www.romans.co.uk%2fRomansImages%2fCMS%2fNewsInsights%2fNews%2fMarraways201410071155325608.jpg&title=A%20September%20to%20remember;%20Romans%20second%20largest%20auction%20sale%20this%20year&summary=With%20the%20joys%20of%20an%20Indian%20summer%20spreading%20through%20the%20packed%20sales%20room,%20Romans%20September%20auction%20&source=www.romans.co.uk%2fRomansImages%2fCMS%2fNewsInsights%2fNews%2fMarraways201410071155325608.jpg

对URL进行解析和编码,使其不包含奇怪的字符,并且可以在所有浏览器中使用。