In the title_filter function, the $replacement expression would be better as:
$replacement = 'l(stripslashes("$2" ? "$2" : "$1"), "title/". urlencode("$1"))';
Since preg_replace appears to escape the quotes in the evaluated pattern.
Since this is happening to the urlencode() link text, that makes the call to check_query($title) in title_page's second query cause an unfortunate doubling.
"that\'s all folks" becomes LIKE '%that \\\\'s all folks%' in the query
Comments
Comment #1
kyber commentedChanged priority since the query problem made this break stuff, not just cosmetic.
Also:
$result = db_query("SELECT n.*, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.title LIKE '%%%s%%' AND n.status = 1 ORDER BY n.created DESC", $title);
This seemed good solution to query problem.
%% seems to escape %, just like in printf()
Comment #2
kyber commentedUnConeD says he took care of it. Closed.
Comment #3
(not verified) commented