Forum Moderators: open

Message Too Old, No Replies

W3 compliant code trick

Yahoo map code isn't compliant here is a fix?

         

moishe

11:17 pm on Apr 29, 2004 (gmt 0)

10+ Year Member



Howdy Ya'll,
I wanted to put a map link on a customers page using Yahoo Maps, but of course, the code they provided was not compliant. Their link contains characters that the validator choked on, here is how I fixed it:

I used an email encoder page to turn their link into ASCII, it then validates fine.

Anyone see a problem with this? The link works and the page validates....

DrDoc

11:24 pm on Apr 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not quite sure what you mean? Couldn't you just fix the link? Seems like that would be easier :)

moishe

12:31 am on Apr 30, 2004 (gmt 0)

10+ Year Member



if a link contains certain symbols like # $ < >! ( ) and especially &, it will not validate, goto yahoo maps and look up a location, then look at the link

pageoneresults

12:50 am on Apr 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It was probably just the ampersand that was causing the validation error. Ampersands must be escaped...

&amp;

vkaryl

1:01 am on Apr 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Lot of "problematics" similar to this out there: counter code from Mohammed A. Muquit is the one some of my pages choked on. Even escaping the ampersands didn't fix it - had to use the "pipe" (¦) symbol instead....

There ARE times when validation is a major pain in the you-know....

DrDoc

1:23 am on Apr 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Personally I have never had any problems with validating...
The problem is just people that do not write valid code, code that I then need to use...

What exactly do you mean when you say "turn the link into ASCII"?

moishe

4:20 am on Apr 30, 2004 (gmt 0)

10+ Year Member


a link such as http://www.webmasterworld.com becomes:
&#104;t&#0116;&#112;&#58;&#47;&#047;&#119;&#0119;&#0119;&#046;&#119;&#0101;&#098;&#109;&#097;&#0115;&#116;&#101;&#114;&#0119;&#111;&#114;&#108;&#0100;&#046;&#99;&#111;&#109;

TGecho

5:55 am on Apr 30, 2004 (gmt 0)

10+ Year Member



Seems like you only have to escape the troublesome characters such as & (38) and ¦ (124).

DrDoc

7:10 am on Apr 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Seems like that would be much easier as well...
If nothing else, easier to read and edit later.

keyplyr

8:13 am on Apr 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I link to a Y! map, escaping several characters in the code, and the page validates.

In the past, I've also run into these same issues with affiliate link generators, 3rd party search boxes,
3rd party tracking code, etc. I think the 'old school' programmers can be blatantly apathetic when
it comes to standards. I've actually received replies "it works doesn't it?" and this was from a major player.