]> git.mxchange.org Git - friendica.git/commitdiff
dbesc and normalise_link
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 10 May 2015 07:10:27 +0000 (09:10 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 10 May 2015 07:10:27 +0000 (09:10 +0200)
mod/match.php

index af4b8479088c5d1defff2cf4f8a5ad935877c156..aa0a69fc954441e12ad4322b569672e95b5c6901 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-
+include_once('include/text.php');
 
 function match_content(&$a) {
 
@@ -48,10 +48,10 @@ function match_content(&$a) {
                        
                        $tpl = get_markup_template('match.tpl');
                        foreach($j->results as $jj) {
-                           $match_nurl = str_replace(array('https:','//www.'), array('http:','//'), $jj->url);
+                           $match_nurl = normalise_link($jj->url);
                            $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1",
                                intval(local_user()),
-                               $match_nurl);
+                               dbesc($match_nurl));
                            if (!count($match)) {
                                
                                $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;