GNOME Bugzilla – Bug 162403
Quotes appear as doubled escaped
Last modified: 2005-07-26 16:47:37 UTC
1. Visit the page http://art.gnome.org/themes/icon/758/ 2. See that ' is displayed as \' Either the author has submitted the art description with the quote escaped or the submition/display PHP code does not handle the escaping correctly (proberly a addslashes too much or a stripslashes missing) Merry christmas and a happy new year.
The bug still appears at http://art.gnome.org/themes/metacity/9/
Thanks for filing this bug. I'm currently trying to root out all the places that cause this bug to appear, whilst stilling making sure the sql code is safe.
echo "stripslashes(data)"; would work, I think - that way, the slashes are stored in the database and only removed when displayed.
The problem is that it is a gnome.org requirement that we validate all text before it is used in mysql queries. In the case where the data is normal strings, such as descriptions or comment), the strings need to be escaped before they are used within a mysql query. The slashes should not be stored in the database. Unfortunatly, it seems that in the current code, sometimes the data is getting escaped more times than expected.
This should be fixed now since art.gnome.org should use its custom escape function to determine whether to add slashes to strings or not.
*** Bug 311537 has been marked as a duplicate of this bug. ***