We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
first off, utf8_decode() is deprecated as of PHP8.2, and you should use
mb_convert_encoding($str, 'utf-8', 'ISO-8859-1')
instead,
second, utf8_decode converts data from ISO-8859-1 to UTF-8, which means that if your XML document is not encoded with ISO-8859-1, the function
/** * Replaces all html entities into its original symbols. * * @param string $content * @return string */ public function convertEntities($content) { $table = array_map('utf8_encode', array_flip( array_diff( get_html_translation_table(HTML_ENTITIES), get_html_translation_table(HTML_SPECIALCHARS) ) )); return preg_replace('/&#[\d\w]+;/', '', strtr($content, $table)); }
doesn't even make sense, and is likely to corrupt UTF-8 XMLs..
The text was updated successfully, but these errors were encountered:
fix PHP8.2 E_DEPRECATED
5b5d705
ref alex-oleshkevich#9
No branches or pull requests
first off, utf8_decode() is deprecated as of PHP8.2, and you should use
instead,
second, utf8_decode converts data from ISO-8859-1 to UTF-8,
which means that if your XML document is not encoded with ISO-8859-1, the function
doesn't even make sense, and is likely to corrupt UTF-8 XMLs..
The text was updated successfully, but these errors were encountered: