Closed mikespub closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.13%. Comparing base (
179670f
) to head (d783c16
). Report is 3 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for this PR!
When a book description contains UTF-8 characters (e.g. Chinese description of Sun Tzu's The Art of War), truncating the content for the summary with substr() may cut it off in mid-character, which results in description = false in the OPDS feed when going through the json_encode(...), json_decode(...) sequence in OpdsJsonEngine::addBookEntry()
Example Content:
Summary with substr():
This is invalid UTF-8, which results in $summary = false in OpdsJsonEngine::addBookEntry()
Summary with mb_substr():
This is valid UTF-8, which works correctly in OpdsJsonEngine::addBookEntry()