Forum


Replies: 2   Views: 3296
Issue with searchandreplace method and < > characters
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 DaveH  · 24-09-2013 - 18:19

I'm trying to replace greater than and less than characters in a .docx file and it seems to be completely ignoring them. I dug around in the code and I think it's due to a strip_tags() call.



Is there any way around this? I have a bunch of documents with text surrounded by <> and I need to replace those with something more useful.



Thank you!



Dave


Posted by jorgelj  · 25-09-2013 - 09:17

Hello,



As DOCX are XML files you can't add '<' or '>' symbols. You need to write &lt; and &gt; .



Regards.