|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25948 XSLT_SABOPT_DISABLE_ADDING_META - if false generates invalid XML
Submitted: 2003-10-22 06:10 UTC Modified: 2003-10-22 21:08 UTC
From: phpdocs at pointbeing dot net Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 4.3.2 OS: Red Hat Linux release 7.3 (Valha
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: phpdocs at pointbeing dot net
New email:
PHP Version: OS:


 [2003-10-22 06:10 UTC] phpdocs at pointbeing dot net
The XSLT_SABOPT_DISABLE_ADDING_META constant, set during compilation, automatically adds:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

to the output when it detects that the output is likely to be HTML. Problem is not the fact that it adds it - but that this line isn't actually valid XML - thus breaking the validity of any output! 

Reproduce code:
Occurs whenever xslt_process() is used to generate HTML output.

Examples -

XSL File:

XML Source:

Expected result:
I would like to see valid XML generated, for example:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Actual result:
This is output automatically:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

This apparently cannot be disabled at runtime.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-22 12:47 UTC] phpdocs at pointbeing dot net
I should add that this occurs when the constant is set to 'false'.
 [2003-10-22 21:08 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

PHP only sets options, the actual addition is performed by the Sablotron library. Hence the bug is in it, not PHP.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Feb 28 19:01:24 2021 UTC