You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found during testing for PHP8.3 (but relevant since PHP8.2).
Deprecation notice:
mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead
This applies to a couple of places where we use this kind of pattern:
This converts UTF8 chars to HTML entities first, so UTF8 characters are retained no matter the output encoding. PHP won't load this as UTF8 unless a specific encoding is set within the loaded content. Setting the DOMDocument itself to UTF8 upon load won't help as it's overridden on the ->loadHTML() call.
Just throwing on '<?xml encoding="UTF-8">' can somewhat mangle the output depending on input (if partial or full HTML fragment).
Need to standardise proper handling depending on what's expected as input/output.
A good point to fully align (and centralise?) general high-level HTML handling maybe, therefore deferring to a full release.
The text was updated successfully, but these errors were encountered:
Adds a thin wrapper for DOMDocument to simplify and align usage within
all areas of BookStack.
Also means we move away from old depreacted mb_convert_encoding usage.
Closes#4638
Found during testing for PHP8.3 (but relevant since PHP8.2).
Deprecation notice:
This applies to a couple of places where we use this kind of pattern:
This converts UTF8 chars to HTML entities first, so UTF8 characters are retained no matter the output encoding. PHP won't load this as UTF8 unless a specific encoding is set within the loaded content. Setting the DOMDocument itself to UTF8 upon load won't help as it's overridden on the
->loadHTML()
call.Just throwing on
'<?xml encoding="UTF-8">'
can somewhat mangle the output depending on input (if partial or full HTML fragment).Need to standardise proper handling depending on what's expected as input/output.
A good point to fully align (and centralise?) general high-level HTML handling maybe, therefore deferring to a full release.
The text was updated successfully, but these errors were encountered: