mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
docs: add comment
This commit is contained in:
parent
9b2e41493c
commit
902fcc677e
@ -61,7 +61,10 @@ class DOMParser
|
||||
*/
|
||||
public function withString(string $content)
|
||||
{
|
||||
// encode character to HTML numeric string reference
|
||||
// DOMDocument::loadHTML() will treat your string as being in ISO-8859-1
|
||||
// (the HTTP/1.1 default character set) unless you tell it otherwise.
|
||||
// https://stackoverflow.com/a/8218649
|
||||
// So encode characters to HTML numeric string references.
|
||||
$content = mb_encode_numericentity($content, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8');
|
||||
|
||||
// turning off some errors
|
||||
|
Loading…
x
Reference in New Issue
Block a user