php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57178 html entities in attribute
Submitted: 2006-08-11 06:36 UTC Modified: 2006-08-11 15:47 UTC
From: justinas at plius dot lt Assigned:
Status: Not a bug Package: xmlwriter (PECL)
PHP Version: 4.4.0 OS: freebsd5.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: justinas at plius dot lt
New email:
PHP Version: OS:

 

 [2006-08-11 06:36 UTC] justinas at plius dot lt
Description:
------------
when I use xmlwriter_write_attribute, it puts attribute value escaped with html entities. When I use the same data to put element value, it shows correctly. I use utf8 with lithuanian symbols. 

Reproduce code:
---------------
xmlwriter_start_element($handler, $key);
xmlwriter_write_attribute($handler, $key, $value);
xmlwriter_text($handler, $value);
xmlwriter_end_element($handler);


Expected result:
----------------
<agent name="Ieva Vy&#269;ait&#279;">Ieva Vy&#269;ait&#279;</agent>
	<agent name="J&#363;rat&#279; Baurien&#279;">J&#363;rat&#279; Baurien&#279;</agent>
	<agent name="Tomas Savickas">Tomas Savickas</agent>
	<agent name="Ieva Grauslyt&#279;">Ieva Grauslyt&#279;</agent>

Actual result:
--------------
<agent name="Ieva Vy&#x10D;ait&#x117;">Ieva Vy&#269;ait&#279;</agent>
	<agent name="J&#x16B;rat&#x117; Baurien&#x117;">J&#363;rat&#279; Baurien&#279;</agent>
	<agent name="Tomas Savickas">Tomas Savickas</agent>
	<agent name="Ieva Grauslyt&#x117;">Ieva Grauslyt&#279;</agent>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-11 06:42 UTC] justinas at plius dot lt
hrr.. 8859-1, not utf8. trying once more:

actual:

<agent name="Ieva Vy&#269;ait&#279;">Ieva Vyčaitė</agent>
	<agent name="J&#363;rat&#279; Baurien&#279;">Jūratė Baurienė</agent>
	<agent name="Tomas Savickas">Tomas Savickas</agent>
	<agent name="Ieva Grauslyt&#279;">Ieva Grauslytė</agent>



expected:
<agent name="Ieva Vyčaitė">Ieva Vyčaitė</agent>
	<agent name="Jūratė Baurienė">Jūratė Baurienė</agent>
	<agent name="Tomas Savickas">Tomas Savickas</agent>
	<agent name="Ieva Grauslytė">Ieva Grauslytė</agent>
 [2006-08-11 15:47 UTC] rrichards@php.net
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit http://pecl.php.net/support/ as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

This looks like a bug in libxml dealing with attribute content and document encoding. I'll look at it over there.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC