dépôts
/
lhc
/
web
/
www.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SPIP] ~maj v3.2.9-->v3.2.11
[lhc/web/www.git]
/
www
/
ecrire
/
inc
/
xml.php
diff --git
a/www/ecrire/inc/xml.php
b/www/ecrire/inc/xml.php
index
26c8077
..
a9a55ee
100644
(file)
--- a/
www/ecrire/inc/xml.php
+++ b/
www/ecrire/inc/xml.php
@@
-212,13
+212,12
@@
function spip_xml_tagname($tag) {
function spip_xml_decompose_tag($tag) {
$tagname = spip_xml_tagname($tag);
$liste = array();
function spip_xml_decompose_tag($tag) {
$tagname = spip_xml_tagname($tag);
$liste = array();
- $p = strpos($tag, ' ');
- $tag = substr($tag, $p);
+ $tag = ltrim(strpbrk($tag, " \n\t"));
$p = strpos($tag, '=');
while ($p !== false) {
$attr = trim(substr($tag, 0, $p));
$tag = ltrim(substr($tag, $p + 1));
$p = strpos($tag, '=');
while ($p !== false) {
$attr = trim(substr($tag, 0, $p));
$tag = ltrim(substr($tag, $p + 1));
- $quote = $tag
{0}
;
+ $quote = $tag
[0]
;
$p = strpos($tag, $quote, 1);
$cont = substr($tag, 1, $p - 1);
$liste[$attr] = $cont;
$p = strpos($tag, $quote, 1);
$cont = substr($tag, 1, $p - 1);
$liste[$attr] = $cont;