Bug #13988 Updated: get_meta_tags function failure if title tag contains a '

From: Date: Mon, 12 Nov 2001 10:11:15 +0000
Subject: Bug #13988 Updated: get_meta_tags function failure if title tag contains a '
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-70221@lists.php.net to get a copy of this message
ID: 13988
User updated by: software@polin.it
Reported By: software@polin.it
Old Status: Closed
Status: Open
Bug Type: Unknown/Other Function
Operating System: Windows 98 first edition
Old PHP Version: 4.0.4pl1
PHP Version: 4.0.6
New Comment:

Yes, it happens with 4.0.6.

Previous Comments:
------------------------------------------------------------------------

[2001-11-09 09:43:31] sniper@php.net

Reopen if this happens with PHP 4.0.6


------------------------------------------------------------------------

[2001-11-08 04:09:22] software@polin.it

Example:

pippo.html
etc etc
<title>Il mio nome e' pippo</title>
<meta name="description" content"ciao ciao">
etc

pippo.php
$tags = get_meta_tags("pippo.html");
echo $tags['description'];

Case A) Failed
<title>Il mio nome e' pippo</title>
<meta name="description" content"ciao ciao">

echo $tags['description'], echos nothing

Case B) OK
<meta name="description" content"ciao ciao">
<title>Il mio nome e' pippo</title>

$tags['description'], echos ciao ciao


Case C) OK, I remove the character '
<title>Il mio nome est pippo</title>
<meta name="description" content"ciao ciao">

$tags['description'], echos ciao ciao

SUMMARY:
It seems there is a problem of get_meta_tags parsing the meta from an html file.
The problem is the ' character.
If it is contained inside a tag title before a meta then get_meta_tags fails.
If the title tag with the ' character is put after the meta, then it works.
If I delete the ' character then it works always.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=13988&edit=1



Thread (6 messages)

« previous php.dev (#70221) next »