Escapes are multiplied when editing data
-
A fast (and almost resolved) issue: accessing the “manage groups” feature, I’m able to input a description for the group I’m creating. But, should the group’s description contain a single quote, it would be saved into the database with an additional “slash”, for example “Rock ‘n’ Roll” would become “Rock \’n\’ Roll”.
Then, if I edit the group, the input shows an escaped escaped single quote, like this: “Rock \\\’n\\\’ Roll”. And this could go on and on.
To solve this issue I added a “stripcslashes()” to the description before it is shown on the page or used as a “value” for the input, like this:
File: adminGroup.php
Line:109
echo htmlentities(stripcslashes($oUamUserGroup->getGroupDesc()));
Line:352
<td><?php echo htmlentities(stripcslashes($oUamUserGroup->getGroupDesc())) ?></td>Now the data is correctly escaped when put into the db but the slash is removed when used.
I only had fixed this input, but you should take a look at all the other inputs used throughout the plugin, to be sure the problems doesn’t arise somewhere else.
But, since this is a very minor (and trivial) issue, I still think this plugin is really useful and a must-have for almost any WordPress out there in the Internet ??
Keep up the good work.
Erenor.
- The topic ‘Escapes are multiplied when editing data’ is closed to new replies.