Skip to content

& and Special Characters, cause xml problems #818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pascaldls opened this issue Jun 16, 2016 · 1 comment
Closed

& and Special Characters, cause xml problems #818

pascaldls opened this issue Jun 16, 2016 · 1 comment

Comments

@pascaldls
Copy link

pascaldls commented Jun 16, 2016

Struggle with this for one day before finding a solution

For \PhpOffice\PhpWord\Shared\Html::addHtml

line 238 private static function parseText

i have added the following to slolve the problem
$element->addText( "<![CDATA[" . $node->nodeValue . "]]>" , $styles['font'], $styles['paragraph']);

this make the text be valid xml

Sorry for creating new bug for but i feel like sharing
Special Characters, cause xml problems #671

@ghost ghost added the Change Request label Jul 9, 2016
@ghost ghost added this to the v0.13.0 milestone Jul 9, 2016
@ghost ghost added the HTML label Jul 9, 2016
@ghost ghost self-assigned this Jul 9, 2016
@ghost
Copy link

ghost commented Jul 9, 2016

#671 (comment).

@ghost ghost closed this as completed Jul 9, 2016
@ghost ghost added Open XML (Word 2007+) and removed HTML labels Jul 9, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant