mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #4895: Force UTF-8 encoding when embedding model documentation
This commit is contained in:
@@ -170,7 +170,7 @@ def get_docs(model):
|
||||
model._meta.model_name
|
||||
)
|
||||
try:
|
||||
with open(path) as docfile:
|
||||
with open(path, encoding='utf-8') as docfile:
|
||||
content = docfile.read()
|
||||
except FileNotFoundError:
|
||||
return "Unable to load documentation, file not found: {}".format(path)
|
||||
|
Reference in New Issue
Block a user