Based on this bug report: https://sourceforge.net/p/simplehtmldom/bugs/207/
It has been observed that the library can occasionally alter the original document. To address this issue, I have created a new feature/option in the form of a patch that allows for the enabling or disabling of htmlentity
operations. By default, this feature is enabled as it was before. However, when the feature is disabled, it will no longer perform any htmlentity
operations and therefore will not modify the original document in any way.
Here's the patch: https://github.com/simplehtmldom/simplehtmldom/commit/fe3ceff0154be778ec5c07c0d83f8b6ede62df0c.patch