Hey Dawn,
I too had this problem. It seems as though there are parts of the code in the gallery component where the user input is altered to work correctly when it is displayed. For instance, there is a filter for HTML and for JS.
But, when it is inserted into the database, it puts it in as it was entered. This can actually cause an SQL injection possibility. I solved the problem by adding the addslashes() php function in the 2 queries where the photo data was inserted into the database.
This occured in the following areas:
around line 446, I changed from:
. "pgitemtitle='" . $pgitemtitle . "',"
. "pgitemdescription='" . $pgitemdescription . "',"
to:
. "pgitemtitle='" . addslashes(stripslashes($pgitemtitle)) . "',"
. "pgitemdescription='" . addslashes(stripslashes($pgitemdescription)) . "',"
I used addslashes and stripslashes as it was the case that if I didn't, the title then had slash before the apostrophe (') in it. This might not be the best way to do it, but it's at least a potential fix for the bug in future releases and what seems to causing the bug in the first place.
The other occurence is in the update code around line 623.
With these changes, I can now add apostrophes into images.
Hope this is helpful,
Joe
Post edited by: jveler, at: 2009/02/26 19:27
Post edited by: jveler, at: 2009/02/26 19:27