[SPIP] v3.2.1-->v3.2.2
[lhc/web/www.git] / www / ecrire / inc / utils.php
index c289352..0a5bac2 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2017                                                *
+ *  Copyright (c) 2001-2019                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -687,7 +687,7 @@ function self($amp = '&', $root = false) {
        include_spip('inc/filtres_mini');
        $url = spip_htmlspecialchars($url);
        
-       $url = str_replace(array("'", '"', '<', '[', ']'), array('%27', '%22', '%3C', '%5B', '%5D'), $url);
+       $url = str_replace(array("'", '"', '<', '[', ']', ':'), array('%27', '%22', '%3C', '%5B', '%5D', '%3A'), $url);
 
        // &amp; ?
        if ($amp != '&amp;') {
@@ -2567,7 +2567,7 @@ function spip_initialisation_core($pi = null, $pa = null, $ti = null, $ta = null
 
                        if (isset($GLOBALS['meta']['adresse_site'])) {
                                $uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
-                               $uri_ref = $uri_ref['path'] . '/';
+                               $uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '') . '/';
                        } else {
                                $uri_ref = "";
                        }