We're trying to use DOMDocument to modify some HTML, but when it hits image/link URL's with '&' it throws an error:
DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line xyz
Thing is, it's not an entity, but a completely valid URL, and said third party websites do not accept & as an equivalent in their URLs.
Is there a way, other than hacks using regex and re-encoding and decoding the & several times, to get DOMDocument to not crap itself on those URLs? libxml_use_internal_errors() doesn't seem like a good solution as we do need valid HTML output in the end, and there seems to be no docs on how this can effect what it outputs.