Hello,
I'm wondering, since XMP is XML-friendly, shouldn't xmpMetadata decode HTML characters references? `exiftool -tagsfromfile img.jpg img.xmp` produces a XMP where & (&), ' ('), " ("), > (>), and < (<) are escaped. On the other hand `exiv2 ex -e xX img.jpg` is fine with quotes, but escapes linefeed (
) among others.
Or perhaps there another way to circumvent HTML character references?
Thanks anyway!
Comments
I checked it against https://en.wikipedia.org/wiki/Character_entity_reference, and as far I saw the entity and numeric (decimal and hexadecimal) references are rendered properly, except one thing: the & (`&`, `&` and `&`) "eats" one character too many in some (!) cases: try eg, to render `&'&'&x&§&e`. On the other hand, `&a&a` looks fine
Don't you get the same result?
Anyway, I did my tests by saving the result to a disk file to keep the browser out of the picture.
But I did notice that `&``apos;` does not get converted. So maybe we really need a full XML character table and not just the PHP `html_entities_decode()` I'll work on that.