Closed (fixed)
Project:
Drupal core
Component:
profile.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2004 at 15:12 UTC
Updated:
23 Aug 2004 at 06:20 UTC
Jump to comment: Most recent file
If an item in a list-type profile field is clicked, it should lead to a page listing all users with that list item--assuming the profile field was configured to support this. However, the percent signs (%) in the SQL get mangled by sprintf, which also uses percent signs as special characters. To avoid this, this patch moves the variable inputs for the SQL statement to the argument list that is passed to db_query().
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | profile.escape_percent_sign.patch | 362 bytes | njivy |
| profile.db_query_args.patch | 1.14 KB | njivy |
Comments
Comment #1
dries commentedI think this is better solved by escaping the '%'-character (i.e. writing '%%'), no?
Comment #2
njivy commentedSure. That works for me.
Comment #3
njivy commentedOh, in case there was a question about the patch, I left out check_query() in the patch because db_query() also performs that check using array_map().
Comment #4
dries commentedCan you test that and provide a new patch?
Comment #5
njivy commentedWith pleasure.
Comment #6
dries commentedThanks. Committed to HEAD.
Comment #7
(not verified) commented