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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
44 - 12 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC