开发者

Is CDATA supposed to be URL-encoded?

Obviously the answer is no... right? The reason I ask is because I have this string defined in XML for an Android app:

<string name="foo"><![CDATA[<html><body><p>This%20is%20开发者_运维问答a%20test</p></body></html>]]></string>

All I do to the string is read it, and display in an HTML view. I would not have expected the %20s to be interpreted, yet they are. Is this the correct behaviour, or is Android being typically buggy?


Is CDATA supposed to be URL-encoded?

No. The only rule of CDATA is that it can't contain a closing CDATA ]]> - everything else is fair game.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜