mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-08-07 16:27:41 +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:
parent
528032fb36
commit
5d851ad747
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user