X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Fbalise%2Furl_.php;h=833b49297d0649bdef699610bddf4938bae6d63a;hp=1533b1ae097f413c4275f04e6c6cb84c19cfb754;hb=122c920eb07e3f665789f8734965b576e6c25515;hpb=226942065cd4f604eb464addf45a065c9e5bc916 diff --git a/www/ecrire/balise/url_.php b/www/ecrire/balise/url_.php index 1533b1ae..833b4929 100644 --- a/www/ecrire/balise/url_.php +++ b/www/ecrire/balise/url_.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2012 * + * Copyright (c) 2001-2014 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -123,7 +123,7 @@ function balise_URL_SITE_dist($p) // http://doc.spip.org/@balise_URL_SITE_SPIP_dist function balise_URL_SITE_SPIP_dist($p) { $p->code = "sinon(\$GLOBALS['meta']['adresse_site'],'.')"; - $p->code = "htmlspecialchars(".$p->code.")"; + $p->code = "spip_htmlspecialchars(".$p->code.")"; $p->interdire_scripts = false; return $p; } @@ -171,18 +171,24 @@ function balise_URL_PAGE_dist($p) { // // #URL_ECRIRE{rubriques} -> ecrire/?exec=rubriques -// +// #URL_ECRIRE* meme chose, mais sans convertir les & en & // http://doc.spip.org/@balise_URL_ECRIRE_dist function balise_URL_ECRIRE_dist($p) { $code = interprete_argument_balise(1,$p); - if (!$code) + if (!$code) { $fonc = "''"; - else{ + } + else { $fonc = $code; $args = interprete_argument_balise(2,$p); - if ($args != "''" && $args!==NULL) - $fonc .= ',' . $args; + if ($args === NULL) { + $args = "''"; + } + $noentities = $p->etoile ? ", true" : ''; + if (($args != "''") OR $noentities) { + $fonc .= ",$args$noentities"; + } } $p->code = 'generer_url_ecrire(' . $fonc .')'; $p->interdire_scripts = false; @@ -201,8 +207,11 @@ function balise_URL_ACTION_AUTEUR_dist($p) { if ($args != "''" && $args!==NULL) $p->code .= ",".$args; $redirect = interprete_argument_balise(3,$p); - if ($redirect != "''" && $redirect!==NULL) + if ($redirect != "''" && $redirect!==NULL) { + if ($args == "''" || $args===NULL) + $p->code .= ",''"; $p->code .= ",".$redirect; + } $p->code = "generer_action_auteur(" . $p->code . ")"; $p->interdire_scripts = false;