- $myurl = str_replace('www.','',$myurl);
- $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' )) ",
- dbesc($myurl),
- dbesc($myurl)
+ $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
+ $diasp_url = str_replace('/profile/','/u/',$myurl);
+ $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' or tag regexp '%s' )) ",
+ dbesc($myurl . '$'),
+ dbesc($myurl . '\\]'),
+ dbesc($diasp_url . '\\]')