简体   繁体   English

URL包含符号“&”时,加载图像失败

[英]Load image failed when URL contains symbol '&'

I used UniversalImageLoader in android project, It unable to load image when the URL contains symbol '&', and I replace all the symbol "&" to the "%26", it doesn't work. 我在android项目中使用了UniversalImageLoader ,当URL包含符号“&”时,它无法加载图像,并且我将所有符号“&”替换为“%26”,这是行不通的。 The URL like this: 像这样的URL:

http://baike.baidu.com/picture/71563/71563/0/10dfa9ec8a136327e14f5154938fa0ec08fac733#
aid=0&pic=10dfa9ec8a136327e14f5154938fa0ec08fac733

It has nothing to do with the "&". 它与“&”无关。 You can't fetch that picture with UniversalImageLoader because the URL you used is wrong. 您无法使用UniversalImageLoader提取该图片,因为您使用的URL错误。 It's a HTML page URL, no the image Url. 这是HTML页面网址,没有图片网址。 In fact the URL of the Image that you want to fetch is: 实际上,您要获取的图像的URL是:

http://d.hiphotos.baidu.com/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50%3Bt%3Dgif/sign=5aac6ec2d343ad4bb2234e92e36b31ca/10dfa9ec8a136327e14f5154938fa0ec08fac733.jpg http://d.hiphotos.baidu.com/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50%3Bt%3Dgif/sign=5aac6ec2d343ad4bb2234e92e36b31ca/10dfa9ec8a136327e14f5154938fa0ec08fac733.jpg

You can right click on that picture and copy its URL to see. 您可以右键单击该图片并复制其URL以查看。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM