]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
escaping was not needed at all to process short urls. Real fix.
authormillette <millette@controlyourself.ca>
Fri, 14 Nov 2008 19:54:57 +0000 (14:54 -0500)
committermillette <millette@controlyourself.ca>
Fri, 14 Nov 2008 19:54:57 +0000 (14:54 -0500)
darcs-hash:20081114195457-099f7-45f4f39d5f2eff980d903ca156170576323ec4a7.gz

lib/util.php

index be391c7859aa2a8a8d158170f1fac5c435e4d928..6f6d615e5c30eb98e00cf6de5b0f16496e9fd80e 100644 (file)
@@ -761,12 +761,10 @@ function common_longurl($uri)  {
 }
 
 function common_shorten_links($text) {
-       $r = htmlspecialchars($text, ENT_NOQUOTES, 'UTF-8');
     // \s = not a horizontal whitespace character (since PHP 5.2.4)
        // RYM this should prevent * preceded URLs from being processed but it its a char
 //     $r = preg_replace('@[^*](https?://[^)\]>\s]+)@e', "common_shorten_link('\\1')", $r);
-       $r = preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $r);
-       return $r;
+       return preg_replace('@https?://[^)\]>\s]+@e', "common_shorten_link('\\0')", $text);
 }
 
 function common_shorten_link($long_url) {