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().

Comments

dries’s picture

I think this is better solved by escaping the '%'-character (i.e. writing '%%'), no?

njivy’s picture

Sure. That works for me.

njivy’s picture

Oh, 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().

dries’s picture

Can you test that and provide a new patch?

njivy’s picture

StatusFileSize
new362 bytes

With pleasure.

dries’s picture

Thanks. Committed to HEAD.

Anonymous’s picture