[website] Project submittal bugs

Back to PHP-IRC Bugs

Page: 1  
From User Message Body
proof_of_death
Post #133
Member
Date: 4:43 am, Mar 11 2006
Posts: 12


The submittal form automatically escapes single quotes, and it submit's correctly. However, since the submittal form gets the values from post, if you modify the project details and modify them again, single quotes show up escaped already (ie \'), and a downward spiral commences where it escapes each backslash and single quote every modify. In other words, stripslashes before you get the description back from post.

Also, the special characters (<,>,') show up fine in the project description, but are converted to html entities for the support thread, and aren't converted back (they show up in their &xx; form).

Manick
Post #135 - Reply to (#133) by proof_of_death
user avatar
Admin
Date: 4:52 am, Mar 11 2006
Posts: 223


Yea you're right. It has to do with how the code just takes the stuff from $_POST and places it right back to output after a submission.

I'll try to find some time to look into it. Thanks for pointing it out.

--Manick
PHP-IRC Developer
proof_of_death
Post #136
Member
Date: 8:14 pm, Mar 11 2006
Posts: 12


Well i'm assuming the reason is that you have smart quotes on so it goes to mysql correctly. All you'd need to do is just add stripslashes when you put it back to the form, say
"<textarea name=\"content\">$content</textarea>"
to
"textarea name=\"content\">".stripslashes($content)."</textarea>"

That would take the slashes away from \n as well, so you'd probably want to change \n to <br> first or something.

And then do htmlspecialchars_decode() when you post it to the message board to get rid of the &xx; stuff.

proof_of_death
Post #143
Member
Date: 5:02 am, Mar 13 2006
Posts: 12


I also just submitted a new version of my mod, and while the revision number changed in the mod description, it still says 0.1 in the mod list

Manick
Post #144 - Reply to (#143) by proof_of_death
user avatar
Admin
Date: 6:19 am, Mar 13 2006
Posts: 223


Haha, you're right. Will upload a fix for it tomorrow.

Thank you for catching that.

--Manick
PHP-IRC Developer
proof_of_death
Post #145
Member
Date: 1:38 pm, Mar 20 2006
Posts: 12


... still shows the revision as 0.1 O:-)

Manick
Post #146
user avatar
Admin
Date: 5:00 pm, Mar 20 2006
Posts: 223


Yea... I haven't actually gotten around to it yet. I've been being kinda lazy lately. I'll get around to it sometime though.

--Manick
PHP-IRC Developer
Manick
Post #181
user avatar
Admin
Date: 5:02 am, Apr 16 2006
Posts: 223


This should like, technically be fixed now. So the next time you update it should update the version.

--Manick
PHP-IRC Developer
   

Back to PHP-IRC Bugs