You can clone with
HTTPS or Subversion.
Warning: DOMDocument::loadXML(): Entity 'nbsp' not defined in Entity, line: 3 in /vagrant/symfony/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php line 836
@dbu: what do you think we need to do here? not quite sure how this can happen, given that we use DOM to generate the XML.
@rryter: can you give us more details on the situation when this happened?
& nbsp ; is not a standard XML entity, it needs a DTD. Does that come from some kind of WYSIWYG editor? You should convert those to numeric entities or proper UTF-8 before (including the proper DTD I would try to avoid)
Not sure anymore, but http://php.net/manual/en/function.html-entity-decode.php should help
yeah .. it comes from Hallo.js
We need to clean such things before saving
so you propose we apply this conversion inside the Doctrine DBAL Client?
Actually, it should be cleaned before, but Doctrine DBAL should maybe reject that. You never really can know, what kind of encoded stuff comes in.
Or should we just CDATA the output in the XML? Why are we storing that as XML anyway? What happens if my text is "hello"? Do we already encode that properly?
And do other transports not have the same problem?
i was wondering too why we dont just store it as CDATA
here is the relevant method:
I guess, we just have to change
"The value will not be escaped. Use DOMDocument::createTextNode() to create a text node with escaping support."
So something like
$element = $propertyNode->appendChild($dom->createElement('sv:value'));
@rryter can you test if that fixes the issue for you?
Yes that fixes the problem!
fix issue with entity encoding by making the value a CDATA (fixes #65)