Jump to content

Malformed URI Reference Error


PhxTrade

Recommended Posts

I have 9 of the following errors in my html when using html tidy. For the life of me I can not figure out what I am doing wrong. Here is the error I am receiving.All dealing with images.191 Warning: <img> escaping malformed URI reference <a href="http://www.thirstyrock.com/images/american_flag.jpg"><img src="images/american_flag.jpg" alt="United States of America" width="50" height="33" align="middle" longdesc="Located in USA"></a>This is the code for the above example:<div class="itemimage"><a href="http://www.thirstyrock.com/images/american_flag.jpg"><img src="images/american_flag.jpg" alt="United States of America" width="50" height="33" align="middle" longdesc="Located in USA"></a></divI now I must be overlooking something, I am new to coding html pages so any help on what I am doing wrong would be greatly appreciated.ThanksTed WPhoenix, AZ.

Link to comment
Share on other sites

What DTD are you using? I couldn't reproduce the error using Transitional HTML or Transitional XHTML. Are you sure that's exactly the code you have in your page? This error usually pops up when you have things like spaces in your URL. For example:www.aWebsite.com/Some page.htmlshould bewww.aWebsite.com/Some%20page.html

Link to comment
Share on other sites

OK,Think I found the answer! After hours of searching I located the culprit.Here is the code that works with no errors. NOTE: the Longdesc. in the code. Ran through html tidy, problem gone with validation.BEFORE:<div class="itemimage"> <a href="#"><img src="images/american_flag.jpg" alt="United States of America" width="50" height="33" align="middle" longdesc="Located in USA"></a> </div>AFTER:<div class="itemimage"> <a href="#"><img src="images/american_flag.jpg" alt="United States of America" width="50" height="33" align="middle" longdesc="data:text/html;charset=utf-8,Located%20in%20USA"></a> </div>Had to change londesc= to data:text/html;charset=utf-8,Located%20in%20USAPercent signs between the spaces for Located in USA, and in front of that put data:text/html;charset=utf-8Seems that somehow should have been able just to type in the description in words and not do all that.If there is a way to set my page up to not have to add all that extra stuff. let me know :) Ted WPhoenix,AZ

Link to comment
Share on other sites

After all that I relied that I do not need the Longdesc anyways. I was under the opinion it was a good place to put a long alt description. Which after reading up on it, it is suppose to point to a location with more info on the picture. So in some cases may do that, but most cases not and will remove.Anyways, it was a great learning experience how to make the darn thing workTed WPhoenix,AZ.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...