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

LinkedIn Sharing is not working properly in I.E 9 and 8

我正在使用 LinkedIn Sharing 分享数据:

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

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

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

感谢任何帮助。

问题不在于代码本身或 IE,而是生成的 link 包含一个让 Internet Explorer 发疯的奇怪字符:'(令我惊讶的是它能在其他人身上运行)。

因此,您生成的 link 是:

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

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

Replace/Remove那个角色和一切正常:

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 进行解析和编码,使其不包含奇怪的字符,并且可以在所有浏览器中使用。