aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_xml.inc.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-07-01 09:27:20 +0000
committerz0rglub <z0rglub@piwigo.org>2003-07-01 09:27:20 +0000
commit0ec91d8b4834d63c65dcbef6ac49ab5a8f68ddd1 (patch)
treeb21ebe1713021f8f783f10b948acdb03878d5223 /include/functions_xml.inc.php
parent1080c51deb551ec63677adb842025065fa0999ba (diff)
*** empty log message ***
git-svn-id: http://piwigo.org/svn/trunk@21 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_xml.inc.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/functions_xml.inc.php b/include/functions_xml.inc.php
index 1919608ad..61ed5d0f9 100644
--- a/include/functions_xml.inc.php
+++ b/include/functions_xml.inc.php
@@ -18,7 +18,6 @@
//------------------------------------------------------------------ constantes
define( ATT_REG, '\w+' );
define( VAL_REG, '[^"]*' );
-
//------------------------------------------------------------------- functions
// getContent returns the content of a tag
//
@@ -32,15 +31,15 @@ function getContent( $element )
// deleting start of the tag
$content = preg_replace( '/^<[^>]+>/', '', $element );
// deleting end of the tag
- $content = preg_replace( '/<\/\w+>$/', '', $content );
+ $content = preg_replace( '/<\/[^>]+>$/', '', $content );
// replacing multiple instance of space character
$content = preg_replace( '/\s+/', ' ', $content );
return $content;
}
-// The function get Attribute returns the value corresponding to the attribute
-// $attribute for the tag $element.
+// The function get Attribute returns the value corresponding to the
+// attribute $attribute for the tag $element.
function getAttribute( $element, $attribute )
{
$regex = '/^<\w+[^>]*'.$attribute.'\s*=\s*"('.VAL_REG.')"/i';