Log in

View Full Version : Dynamic image tag validating as XHTML/Basic



danbowkley
11-25-2007, 05:08 AM
Hey all,

I'm coding a php app to download images to your cellphone, and am running into a wall trying to get my thumbnails to work. The validator complains that there isn't a semicolon after the = sign...and that'd kinda break things.

I'm calling the images with something like this:

<img src="thumber.php?f=images/190396220037.jpg&w=72&h=99&q=30&t=jpg" border="0" height="99" width="72" alt="preview">


It also barfs and complains that it's not using a jpg or gif for an image, when I know darned well the php script is spitting back a perfectly valid jpg file (or gif or bmp or wbmp or png or frankly whatever the heck you ask it for).

Without using mod_rewrite, how can I get that little fart to validate?

Many TIA,
Dan

djr33
11-25-2007, 08:03 AM
You can do a few things.

One, instead of an ampersand (&), it's valid to use a semi-colon ( ; ) between variable entries.

Two, you can escape the ampersands for html. Use &amp;

I hope this helps.

As for it not liking it for not being a jpg, etc., that's dumb. See if fixing the rest helps it understand that it is valid. If not, I'm not sure what to say about that, except that it's unfortunate.