View Issue Details

IDProjectCategoryView StatusLast Update
0006265JEDI VCL00 JVCL Componentspublic2014-12-04 16:39
ReporterchkAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.47 
Target VersionFixed in Version 
Summary0006265: JvStrings.XMLSafe didn't replace " '
Description
http://www.w3.org/standards/xml/core

tells:
In XML, there are only five built-in character entities: <, >, &, " and ' for <, >, &, " and ' respectively.

But XMLSafe didn't replace the " and '
TagsNo tags attached.

Activities

jfudickar

2014-03-18 22:28

developer   ~0020929

I've changed the implementation to Use JclSimpleXml.EntityEncode.

And i marked the funtion as deprecated. So please use Use JclSimpleXml.EntityEncode

chk

2014-03-31 10:47

reporter   ~0020939

But XMLSafe converted the characters greater than 128 too, EntityEncode did not. I'm no XML-Expert, but I think this could have had a reason...

OK, I see that XML prefered Hex-Values and XMLSafe produces Decimals, but this is another But, I think.

Or you are right and the chars greater 128 needs no change. I think it depends on the Target-Format UTF-8 or ANSI.
So if used UTF-8 the char may be allowed to use, but the Programmer should know that the string has to be converted to UTF-8 too, after using EntityEndode.
With XMLSafe it this not necessary.

chk

2014-03-31 11:46

reporter   ~0020940

I searched deeper: When using Unit JclSimpleXml why didn't we use XMLEncode or SimpleXMLEncode instead of EntityEncode.
Many functions, all doing nearly the same. Maybe EntityEncode could marked deprecated too?

jfudickar

2014-04-20 20:03

developer   ~0020951

Usage of EntityEncode or SimpleXMLEncode is base on the options of the simplexml object.

But you are right. I switched the implementation again to SimpleXMLEncode. This should be the right function.

Issue History

Date Modified Username Field Change
2014-03-12 11:53 chk New Issue
2014-03-18 22:28 jfudickar Note Added: 0020929
2014-03-31 10:47 chk Note Added: 0020939
2014-03-31 11:46 chk Note Added: 0020940
2014-04-20 20:03 jfudickar Note Added: 0020951
2014-04-27 12:35 jfudickar Status new => feedback
2014-12-04 16:39 obones Status feedback => resolved
2014-12-04 16:39 obones Resolution open => fixed
2014-12-04 16:39 obones Assigned To => obones