php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21640 phpinfo() should contain character encoding to be valid html
Submitted: 2003-01-14 12:14 UTC Modified: 2003-01-15 03:48 UTC
From: hanno at gmx dot de Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.3.0 OS: Linux
Private report: No CVE-ID: None
 [2003-01-14 12:14 UTC] hanno at gmx dot de
The phpinfo()-function should contain a character encoding meta-tag. This would make it valid html with the w3c-validator at http://validator.w3.org.

The meta-tag would be like:
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-14 12:15 UTC] derick@php.net
Why care for a debug tool? It's not that phpinfo() is supposed to be used everywhere. Also iso-8859-1 might not be always correct.
 [2003-01-14 16:56 UTC] hanno at gmx dot de
Well, iso-8859-1 was only an example-tag.
It is really simple to implement, so why not making it valid.
 [2003-01-14 19:21 UTC] sniper@php.net
It's a debug tool. There's absolutely NO reason for it being 100% valid as long as it can be READ.

 [2003-01-15 03:43 UTC] hanno at gmx dot de
Well, it seems that this is already implenented, only commented out.
After looking at
/php-4.3.0/ext/standard/info.c
I found these lines:
/*
	php_printf("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\" />\n", charset);
*/

So you just have to uncomment it and it'll work.
 [2003-01-15 03:48 UTC] sniper@php.net
Here you can find the reason:

http://marc.theaimsgroup.com/?l=php-dev&m=103486469714881&w=2
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 08:01:29 2024 UTC