Ignore UTF-8 errors in addon docs (#6076)

Add-on documentation might not have valid UTF-8 encoding. Since this
is user provided content, we should not fail if it contains invalid
UTF-8 characters. Instead, we can replace them with a placeholder.
This commit is contained in:
Stefan Agner 2025-08-07 09:39:53 +02:00 committed by GitHub
parent 528032fb36
commit 5d851ad747
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -645,7 +645,7 @@ class AddonModel(JobGroup, ABC):
return None
# Return data
return readme.read_text(encoding="utf-8")
return readme.read_text(encoding="utf-8", errors="replace")
return await self.sys_run_in_executor(read_readme)