forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Titooy on December 30, 2004, 11:50:33 am
-
I should have posted this as an answer to http://forum.coppermine-gallery.net/index.php?topic=9485.0 but since I can't post there, here is my remark:
In 1.4a, when there's a "&" in a text field (title, description, alt), the page doesn't validate anymore. See http://validator.w3.org/check?uri=http%3A%2F%2Fwww.picture-parade.co.uk%2Fdevel%2F;verbose=1
-
I got This Page Is Valid XHTML 1.0 Transitional!
The page you presented for validation contains 'Jack & Doris', right?
edit: Strange... I got a different result when I clicked the validation button on the page itself, instead of the link you posted.
-
??? How strange ! It didn't validate 20 minutes ago...
I don't know what changed within that time...
edit: If you check the css, it says the xml doesn't validate
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.picture-parade.co.uk%2Fdevel%2F
-
::) Now it doesn't validate anymore.
I attached the "not validated" page so you can check it even if it validates when you try.
-
There seems to be a difference based on if the results are verbose or not. The link in your post was for the verbose result, which was valid. The one on your website was not valid, and it showed the & message.
-
Just to notice it's not my site. It's Casper's demo site... the only 1.4 I know that's on-line...
btw, the file I attached is the verbose version...
-
Yes, it's my test site, and the validation error in the css is caused by the '&' in the album name.
But this is a test site, often running in themes not yet converted to valid, and the page you saw was not showing the w3c validation links, and not claiming to be such.
This does show that no matter how good we get the code, the end user can destroy the validation in one go with a bad name used to describe something.
-
I think it shouldn't be hard to change "&" into "&" when the page is set. I'm not an expert in php but I think even me could do the needed changes... If no expert does it, I'm gonna look into it later today. Since a "&" in a title is not exceptional, I think it should be corrected in the final release.
-
If you can do it, that will be great since we already have a lot to do and every bit helps. Thanks.
-
OPEN <coppermine>/include/init.inc.php
FIND$HTML_SUBST = array('"' => '"', '<' => '<', '>' => '>');
REPLACE with$HTML_SUBST = array('&' => '&', '"' => '"', '<' => '<', '>' => '>');
It doesn't do it for the data already in the database but it'll work for the new ones.
-
@ Titooy, thanks, committing to dev version.
-
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.picture-parade.co.uk%2Fdevel%2F;verbose=1 validates, so I guess it's safe to mark this thread as "fixed".
Joachim