From dd40129952df76cfc74b22124f54905bf144360c Mon Sep 17 00:00:00 2001 From: "Loibl Johannes (IFAG DES PTS TI EA DE)" Date: Mon, 16 Jan 2023 15:04:49 +0100 Subject: [PATCH] Fix #4019 Explicitly encode plotly.min.js content as utf-8, since get_plotlyjs returns utf-8 decoded content. --- packages/python/plotly/plotly/io/_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/plotly/plotly/io/_html.py b/packages/python/plotly/plotly/io/_html.py index 606df721f33..765dd456efb 100644 --- a/packages/python/plotly/plotly/io/_html.py +++ b/packages/python/plotly/plotly/io/_html.py @@ -542,7 +542,7 @@ def write_html( bundle_path = path.parent / "plotly.min.js" if not bundle_path.exists(): - bundle_path.write_text(get_plotlyjs()) + bundle_path.write_text(get_plotlyjs(), encoding="utf-8") # Handle auto_open if path is not None and full_html and auto_open: