php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36443 Parser gives errors when meeting & &eur;
Submitted: 2006-02-18 17:06 UTC Modified: 2006-02-18 17:20 UTC
From: iongion at email dot ro Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5CVS-2006-02-18 (CVS) OS: Windows, Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: iongion at email dot ro
New email:
PHP Version: OS:

 

 [2006-02-18 17:06 UTC] iongion at email dot ro
Description:
------------
SimpleXML

Parser gives errors when meeting & &eur; and other used type of entities.

Reproduce code:
---------------
<?xml version="1.0" encoding="utf-8"?>
<quizz name="QuizName">
<item>
Me &amp; Myself and Irene
</item>
<item>
The conversion rate is 0.80&euro; for 1$
</item>
</quizz>

Expected result:
----------------
I would expect to parse a correct string, to have in:

item[0] = "Me &amp; Myself and Irene" , that i would further use to output in a html page "Me & Myself and Irene"

item[1] = "The conversion rate is 0.80&euro; for 1$", that i would further use to output in a html page: "The conversion rate is 0.80? for 1$

Actual result:
--------------
The script breaks, the parser screams out loud "unknown entity" ... it doesnt even ignore those entities, it simply dies.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-18 17:20 UTC] derick@php.net
You didn't define the &euro; entity in your XML. It's an *HTML* entity, if you want to use that in XML you have to define it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC