Forum


Replies: 2   Views: 3432
Html to docx - problem with named entities
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by kstauff  · 05-04-2013 - 21:39

(Using PHPdocX 3.1)

I am converting IMS Content Package HTML to Word documents. I have some discovered an issue with some of the HTML entities. For example the single down arrow ↓ (& darr;) works fine in the conversion. However, the double down arrow ⇓(& dArr;) breaks in the word document. I tried converting from the named HTML entities to HTML decimal (e.g. & #8594;) (And note that the spaces aren't being used in the actual entities in the code).

The only thing that I have found that works is to do a string replace in the code:
$output = str_replace("& dArr;","& darr;",$output);

But obviously I don't want to do this for every case like this that turns up. Is there anything else I can try?

Thanks,
Karen

Posted by admin  · 11-04-2013 - 12:13

Hello,

We'll check your issue. Meanwhile please use the solution you indicate.

Regards.