Skip to content

Load content into WebViews through URLs - #5442

Merged
cwisniew merged 1 commit into
RPTools:developfrom
kwvanderlinde:bugfix/3076-unicode-parser+4832-frame5-emojis
May 17, 2025
Merged

Load content into WebViews through URLs#5442
cwisniew merged 1 commit into
RPTools:developfrom
kwvanderlinde:bugfix/3076-unicode-parser+4832-frame5-emojis

Conversation

@kwvanderlinde

@kwvanderlinde kwvanderlinde commented May 15, 2025

Copy link
Copy Markdown
Collaborator

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 that WebEngine.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

  • Fixed a bug where many unicode characters could not be represented properly in frame5, dialog5, and overlays.

This change is Reviewable

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.
@kwvanderlinde kwvanderlinde self-assigned this May 15, 2025
@github-actions github-actions Bot added the bug label May 15, 2025
@kwvanderlinde kwvanderlinde moved this from Todo to Awaiting-Review in MapTool 1.18 May 15, 2025
@github-project-automation github-project-automation Bot moved this from Awaiting-Review to To-Be-Merged in MapTool 1.18 May 17, 2025
@cwisniew
cwisniew added this pull request to the merge queue May 17, 2025
Merged via the queue into RPTools:develop with commit 27ad637 May 17, 2025
@github-project-automation github-project-automation Bot moved this from To-Be-Merged to Merged in MapTool 1.18 May 17, 2025
@kwvanderlinde
kwvanderlinde deleted the bugfix/3076-unicode-parser+4832-frame5-emojis branch May 17, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

[Bug]: frame5() not handling UTF-8 emojis in certain situations which work in chat and frame

2 participants