Load content into WebViews through URLs - #5442
Merged
cwisniew merged 1 commit intoMay 17, 2025
Merged
Conversation
Loading content directly through `WebEngine#loadContent(String)` does not work as unicode characters above 0xFFFF are not correctly interpreted. Instead, use `WebEngine#load(String)` and pass a base64 data URL.
cwisniew
approved these changes
May 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Identify the Bug or Feature request
Fixes #4832
Description of the Change
WebEngine.loadContent()seems unable to correctly handle unicode characters above 0xFFFF. However,WebEngine.load()is able to handle content with such characters in the resolved document. So this PR changes the way frame5, dialog5, and overlay content is loaded so thatWebEngine.load()is called with a base64-encoded URL.Note: for chat, frame, and dialog, the same sort of problem was resolved by using the new unicode-aware parser. frame5, dialog5, and overlays also depends on the new parser, but require this additional work to really fix the unicode issues with them. Also, the built-in font does not support every unicode character, but such support can be added by the document author by including suitable fonts (e.g., Noto Emoji).
Possible Drawbacks
Extra computation will be required to load an HTML5 document.
Documentation Notes
N/A
Release Notes
This change is