Fix visualization HTML charset handling#466
Fix visualization HTML charset handling#466Samay10 wants to merge 1 commit intogoogle:maingoogle/langextract:mainfrom Samay10:fix-visualization-html-charsetSamay10/langextract:fix-visualization-html-charsetCopy head branch name to clipboard
Conversation
|
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
|
Your branch is 7 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
2 similar comments
|
Your branch is 7 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
|
Your branch is 7 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
Fixes #234
Description
Saved visualization HTML should always be interpreted as UTF-8. Without an explicit charset, some browsers can guess a different encoding based on the user’s system settings that might cause non-ASCII text to render incorrectly.
This change adds a UTF-8 charset meta tag to the HTML returned by
visualize(), so saved visualization files render consistently across browsers.How Has This Been Tested?
pyink langextract/visualization.py tests/visualization_test.py --config pyproject.tomlpytest tests/visualization_test.py(5 passed)pytest tests; the visualization tests passed, but the full suite still has unrelated local failures from the missing optionalopenaipackage and one pip-install plugin discovery testChecklist