dépôts
/
ptitvelo
/
web
/
www.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SPIP] ~maj 3.0.13 -> 3.0.14
[ptitvelo/web/www.git]
/
www
/
ecrire
/
inc
/
utils.php
diff --git
a/www/ecrire/inc/utils.php
b/www/ecrire/inc/utils.php
index
5059655
..
b875aa2
100644
(file)
--- a/
www/ecrire/inc/utils.php
+++ b/
www/ecrire/inc/utils.php
@@
-3,7
+3,7
@@
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-201
2
*
+ * Copyright (c) 2001-201
4
*
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
@@
-45,7
+45,7
@@
function charger_fonction($nom, $dossier='exec', $continue=false) {
if (!preg_match(',^\w+$,', $f)){
if ($continue) return false; //appel interne, on passe
if (!preg_match(',^\w+$,', $f)){
if ($continue) return false; //appel interne, on passe
- die(htmlspecialchars($nom)." pas autorise");
+ die(
spip_
htmlspecialchars($nom)." pas autorise");
}
// passer en minuscules (cf les balises de formulaires)
}
// passer en minuscules (cf les balises de formulaires)
@@
-66,7
+66,7
@@
function charger_fonction($nom, $dossier='exec', $continue=false) {
include_spip('inc/minipres');
echo minipres(_T('forum_titre_erreur'),
include_spip('inc/minipres');
echo minipres(_T('forum_titre_erreur'),
- _T('fichier_introuvable', array('fichier'=> '<b>'.htmlentities($d).'</b>')));
+ _T('fichier_introuvable', array('fichier'=> '<b>'.
spip_
htmlentities($d).'</b>')));
exit;
}
exit;
}
@@
-406,11
+406,16
@@
function nettoyer_uri($reset = null)
return $propre = (preg_replace(',[?&]$,', '', $uri1));
}
return $propre = (preg_replace(',[?&]$,', '', $uri1));
}
-//
-// donner l'URL de base d'un lien vers "soi-meme", modulo
-// les trucs inutiles
-//
-// http://doc.spip.org/@self
+
+/**
+ * Donner l'URL de base d'un lien vers "soi-meme", modulo les trucs inutiles
+ *
+ * @param string $amp
+ * Style des esperluettes
+ * @param bool $root
+ * @return string
+ * URL vers soi-même
+**/
function self($amp = '&', $root = false) {
$url = nettoyer_uri();
if (!$root
function self($amp = '&', $root = false) {
$url = nettoyer_uri();
if (!$root
@@
-436,7
+441,8
@@
function self($amp = '&', $root = false) {
}
// eviter les hacks
}
// eviter les hacks
- $url = htmlspecialchars($url);
+ include_spip('inc/filtres_mini');
+ $url = spip_htmlspecialchars($url);
// & ?
if ($amp != '&')
// & ?
if ($amp != '&')
@@
-2142,7
+2148,7
@@
function recuperer_fond($fond, $contexte=array(), $options = array(), $connect='
}
$page = pipeline('recuperer_fond',array(
}
$page = pipeline('recuperer_fond',array(
- 'args'=>array('fond'=>$f
ond
,'contexte'=>$contexte,'options'=>$options,'connect'=>$connect),
+ 'args'=>array('fond'=>$f,'contexte'=>$contexte,'options'=>$options,'connect'=>$connect),
'data'=>$page
));
if (isset($options['ajax']) AND $options['ajax']){
'data'=>$page
));
if (isset($options['ajax']) AND $options['ajax']){