mysql_real_esacpe_string should be prefered over addslashes for the reason of different character encodings.
It has been discussed before http://drupal.org/node/13180#comment-23787 the reason for rejection were version conflicts, that are not present anymore since PHP 4.3.3 is required in HEAD /INSTALL.txt and mysql_real_escape_string exists since 4.3.
However I have added a fallback to addslashes incase no db is established. If that is not necesary it can be removed.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | mysql_real_escape_string_0.patch | 897 bytes | Uwe Hermann |
| mysql_real_escape_string.patch | 814 bytes | Thomas Ilsche |
Comments
Comment #1
Uwe Hermann commentedFixed typos and minor cosmetic issues in the patch. I didn't test if it works, merely if it applies to HEAD.
Comment #2
moshe weitzman commentedi see no legitimate reason to hold this one back. if someone does, please change status.
Comment #3
dries commentedCommitted a modified version to HEAD.
Comment #4
(not verified) commented