php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64434 Tidy's character encoding options in the options array are not respected
Submitted: 2013-03-15 17:37 UTC Modified: 2013-10-15 11:54 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: dcasale at soundmessaging dot com Assigned:
Status: No Feedback Package: Tidy (PECL)
PHP Version: 5.3.23 OS: Ubuntu Linux
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:
Package:
Bug Type:
Summary:
From: dcasale at soundmessaging dot com
New email:
PHP Version: OS:

 

 [2013-03-15 17:37 UTC] dcasale at soundmessaging dot com
Description:
------------
The char-encoding, input-encoding, and output-encoding options do not appear to 
be respected for tidy_parse_string.  The optional third parameter to 
tidy_parse_string (encoding) is, however.  I've tested this with attempting a 
tidy of the following:

<!DOCTYPE html>
<head>
<title></title>
</head>
<body>
<span>(unicode bullet point, x2022)</span>
</body>
</html>

With the following options:

array(
	'add-xml-decl'		=> true,
	'output-xhtml'		=> true,
	'char-encoding'		=> 'utf8',
	'literal-attributes'	=> true,
	'numeric-entities'	=> true,
	'ncr'			=> true,
	'wrap'			=> 0,
	'indent'		=> true,
	'hide-comments'		=> true
)

Instead of the expected result, I get &#226;&#128;&#162; in place of the bullet 
point, which is wrong.

I've looked at the tidy.c source for 5.3.23, and the source does not appear to 
properly account for the encoding options in the options array.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-02 08:27 UTC] mike@php.net
-Status: Open +Status: Feedback
 [2013-10-02 08:27 UTC] mike@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2013-10-15 11:54 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 23 11:03:34 2021 UTC