标签: html facebook character-encoding
我使用这个网址:
https://www.facebook.com/sharer/sharer.php?s=+100&p%5Btitle%5D=SiTs+helsetilbud&p%5Burl%5D=http%3A%2F%2Fwww.sit.no%2Fhelse&p%5Bsummary%5D=SiT+tilbyr+tjenester+som+kan+hjelpe+studenter+p%E5+veien+mot+god+helse.+Bredden+i+v%E5rt+helsetilbud+er+stor%2C+og+alle+tjenestene+er+tilpasset+studentenes+behov.+SiT+kan+hjelpe+deg%21&p%5Bimages%5D%5B0%5D=http%3A%2F%2Fsithelse.unco.no%2Ffileshare%2Ffilarkivroot%2Fhelse%2FFacebookdeling%2FAngst.png
在Facebook上分享。它在Firefox中运行良好但在IE中呈现错误。挪威人物æøåas 。
我试图用å和iso%e5替换它
有什么建议吗?
答案 0 :(得分:2)
使用JavaScript的encodeURIComponent返回的值来表示这些字符。例如:
encodeURIComponent
> encodeURIComponent('å') "%C3%A5"
所以,只是为了修复链接中的一个字符,请使用%C3%A5(不 %E5或å):
%C3%A5
%E5
å
https://www.facebook.com/sharer/sharer.php?s=+100&p%5Btitle%5D=SiTs+helsetilbud&p%5Burl%5D=http%3A%2F%2Fwww.sit.no%2Fhelse&p%5Bsummary%5D=SiT+tilbyr+tjenester+som+kan+hjelpe+studenter+p%C3%A5+veien+mot+god+helse.+Bredden+i+v%C3%A5rt+helsetilbud+er+stor%2C+og+alle+tjenestene+er+tilpasset+studentenes+behov.+SiT+kan+hjelpe+deg%21&p%5Bimages%5D%5B0%5D=http%3A%2F%2Fsithelse.unco.no%2Ffileshare%2Ffilarkivroot%2Fhelse%2FFacebookdeling%2FAngst.png