且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

字符串资源xml中的URL

更新时间:2022-04-17 18:47:52

您不能直接使用& ,因为XML文档应该是 URL编码,并将& 替换为%26 (如您所做的那样)),因为浏览器确实了解了他们必须了解的东西.

You cannot use & directly, because XML document is expected to be well-formed and the problem is with & character itself. For XML/HTML you would have to use & entity (or &), but for URL use URL encoding and replace & it with %26 (as you did) which should simply work as browsers do understand such things as they simply have to.