From 0ec91d8b4834d63c65dcbef6ac49ab5a8f68ddd1 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Tue, 1 Jul 2003 09:27:20 +0000 Subject: *** empty log message *** git-svn-id: http://piwigo.org/svn/trunk@21 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_xml.inc.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/functions_xml.inc.php') 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'; -- cgit v1.2.3