if links with & don't validate

i thought i'd post this in case anyone else runs into a similar problem. i was getting errors for a video thumbnail in the paged_thumbs_nav portion of my image.php page intermittently when there were "&" entities in the src url of the img. i found out the problem was that the resize commands in the url for the default video thumbnail was causing a lot of issues with the validator.

an example url would be something like:
`zp-core/i.php?a=test2&i=image_name.jpg&w=100&h=100&cw=100&ch=100&q=75&t=1`

as soon as i made a thumbnail for all of the videos in the album, it validated without problem.

i put this in general discussion because i'm not asking that this be corrected any time soon. it probably wouldn't happen very often, and isn't difficult to avoid. zenphoto continues to be a great tool.

Comments

  • acrylian Administrator, Developer
    Thanks, we will look into this. As you assumed that happens only until the image is cached.
  • the errors were whenever there was not a custom image to go with the movie. according to the w3c, the ampersands should all be listed as entities, even if they are inside of web addresses. i don't know why the validator doesn't freak out over every ampersand in every zenphoto generated thumb, but it doesn't.
  • acrylian Administrator, Developer
    I/we know that W3 requirement and most links are either "validated" via `htmlspecialchars()` or use `&` for & from the beginning. It might happen that we miss one. Also the `getXXX` functions that return a link directly always return it raw so you need to add `htmlspecialchars()` yourself (remember JS is sometimes picky if you use entities).

    As said: That the validator does not "freak out" is because only the uncached image links use the &, then the cached image is used.
Sign In or Register to comment.