문제

I try to validate my web page and I get the UNESCAPED ERRORS due to the & characters in the image URL:

Original URL: http://weathersticker.wunderground.com/weathersticker/cgi-bin/banner/ban/wxBanner?bannertype=wu_clean2day_metric_cond&airportcode=WMKK&ForcedCity=Kuala%20Lumpur&ForcedState=&wmo=48647&language=EN

I tried to replace the & with %26 and also & but the image became invalid.

Is there a way to solve this?

도움이 되었습니까?

해결책

Replacing the & with & is correct - but only for the HTML representation of the URL.

If you paste the HTML representation of the URL into the address bar, then it won't work because the address bar expects a text representation of the URL.

The HTML representation of the URL will work fine when entered as the value of a src attribute.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top