I am working with phpOffice/phpword document download. When I pass the content to the document download the content is like this,
<p>& operation check</p><p> < operation check</p><p> > operation check</p>
I want to change special character and content like,
<p> & operation check</p> <p> < operation check</p> <p> > operation check</p>
I have done;
$textContent = strip_tags($content);
$content = htmlspecialchars($textContent);
The issue for the above I can replace html entities for the special characters, but I remove the html other tags and pass to document creation. then content style missing because only send the text content.
I have check the php - tidy. but not worked properly. can someone explain way to implement above operation.