简体   繁体   English

如何在tvO中指定包含&符的图像URL?

[英]How do you specify image URLs in tvOs that include ampersands?

I have the following image tag in an TVXML file: 我在TVXML文件中具有以下图像标签:

<img src="http://dqndusk8a84ol.cloudfront.net/image/a2e92e83778e3fdaf05f88cffbee1c7e.jpg?&amp;x=720&amp;y=427&amp;icq=50&amp;sig=934b011bc0039797f64e9d268dfbc859" width="720" height="427"/>

The emulator does not seem to want to load this image. 仿真器似乎不想加载该图像。 It has the placeholder image shown (basically a gray background) but not my image. 它显示了占位符图像(基本上是灰色背景),但没有显示我的图像。

I've tried double encoding the ampersand as well has just having the bare & but no dice. 我尝试过对&符进行双重编码,也只用了裸露的&但没有骰子。

Does anyone know how to get this to work? 有谁知道如何使它工作?

Versions: XCode 7.1 Beta 3, tvOS Beta 3 版本:XCode 7.1 Beta 3,tvOS Beta 3

Update: I've opened a radar ticket with id: 23149717. 更新:我已经打开了ID为23149717的雷达票。

It looks like there is no real problem here. 看起来这里没有任何实际问题。 This URL looks to have needed a extra ampersand to work (guessing the signature param in this URL took that prepended ampersand into account). 该URL似乎需要一个额外的&符号才能起作用(猜测该URL中的签名参数时已考虑了前置的&符号)。

Nice, I just filed a radar as well: 23531029 不错,我也刚提交了雷达:23531029

FWIW, I was able to get it to work by replacing "&" in the url with "&" (found from this blog: http://mrcoles.com/blog/how-use-amersands-html-encode/ ) FWIW,我可以通过将URL中的“&”替换为“&”(从此博客中找到: http : //mrcoles.com/blog/how-use-amersands-html-encode/ )来使其工作。

I took your exact block of html above (copy and paste) and it worked for me.. 我把您上面的html确切块(复制并粘贴),对我有用。

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

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