Skip to content
Snippets Groups Projects
Commit f953279e authored by Sebastien Jourdain's avatar Sebastien Jourdain Committed by Kitware Robot
Browse files

Merge topic 'fix-py3-encoding'


2f33c858 WebExport: Fix Python 3 missing html encoding

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !6884
parents 4a107eba 2f33c858
Branches
No related tags found
No related merge requests found
......@@ -45,8 +45,8 @@ def addDataToViewer(dataPath, srcHtmlPath):
base64Content = base64Content.decode().replace('\n', '')
# Create new output file
with open(srcHtmlPath, mode='r') as srcHtml:
with open(dstHtmlPath, mode='w') as dstHtml:
with open(srcHtmlPath, mode='r', encoding="utf-8") as srcHtml:
with open(dstHtmlPath, mode='w', encoding="utf-8") as dstHtml:
for line in srcHtml:
if '</body>' in line:
dstHtml.write('<script>\n')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment