Bug #3841: HTML and PHP tag removal bug
| From: | mortenj at monet dot no | Date: | Wed, 15 Mar 2000 23:19:59 +0000 |
| Subject: | Bug #3841: HTML and PHP tag removal bug | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16865@lists.php.net to get a copy of this message | ||
From: mortenj@monet.no
Operating system: Linux
PHP version: 3.0.12
PHP Bug Type: Misbehaving function
Bug description: HTML and PHP tag removal bug
*** Related to function fgetss() ***
Seems like (at least in some cases) that the contents of
the tag is still displayed it it contains whitespace. This code will eventually add pages to a
search engine, but the contents of HTML tags can't come with the info. Kind of annoying this
one. (Is this done on purpose?)
CODE EXAMPLE
$fp = fsockopen("$host", 80, &$errno, &$errstr, 30);
if(!$fp) {
echo "$errst ($errno)<br>\n";
} else {
fputs($fp,"GET $geturl HTTP/1.0\n\n");
while(!feof($fp)) {
$input = fgetss($fp,1024);
$input = trim($input);
if($input != "") {
$input = "$input\n";
echo $input;
}
}
fclose($fp);
}