mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-20 02:18:59 +00:00
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:
@@ -645,7 +645,7 @@ class AddonModel(JobGroup, ABC):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
# Return data
|
# 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)
|
return await self.sys_run_in_executor(read_readme)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user