]> git.mxchange.org Git - friendica.git/commitdiff
urlencode is better
authorMichael Vogel <icarus@dabo.de>
Thu, 30 Jun 2016 06:58:36 +0000 (08:58 +0200)
committerMichael Vogel <icarus@dabo.de>
Thu, 30 Jun 2016 06:58:36 +0000 (08:58 +0200)
mod/fetch.php
mod/p.php

index f0838af507e0433115e4aa2112d19ad357df26fc..cfcd82bb31e04dd345bcff26b8b5aa230e88614d 100644 (file)
@@ -27,7 +27,7 @@ function fetch_init($a){
                        $parts = parse_url($r[0]["author-link"]);
                        $host = $parts["scheme"]."://".$parts["host"];
 
-                       $location = $host."/fetch/".$a->argv[1]."/".$guid;
+                       $location = $host."/fetch/".$a->argv[1]."/".urlencode($guid);
 
                        header("HTTP/1.1 301 Moved Permanently");
                        header("Location:".$location);
index df904372add3165ecc3315acd67927337378865a..899b51116dacb43aaf74ab47a37b8f4b9429e12e 100644 (file)
--- a/mod/p.php
+++ b/mod/p.php
@@ -31,7 +31,7 @@ function p_init($a){
                        $parts = parse_url($r[0]["author-link"]);
                        $host = $parts["scheme"]."://".$parts["host"];
 
-                       $location = $host."/p/".$guid.".xml";
+                       $location = $host."/p/".urlencode($guid).".xml";
 
                        header("HTTP/1.1 301 Moved Permanently");
                        header("Location:".$location);