[16.0][FIX] document_page_reference: migrate widget to OWL#622
Open
dnplkndll wants to merge 1 commit into
Open
[16.0][FIX] document_page_reference: migrate widget to OWL#622dnplkndll wants to merge 1 commit into
dnplkndll wants to merge 1 commit into
Conversation
Contributor
|
Hi @etobella, |
This was referenced Jun 19, 2026
d993744 to
52287c1
Compare
content_parsed is sanitize=False so the rendered oe_direct_line anchors the widget binds to survive (html_sanitize strips the data-oe-* attrs); the source content is still sanitized and page names are html_escape'd.
52287c1 to
fee7446
Compare
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.
Supersedes #601 (rebased on current 16.0). Original work by @IJOL.
The legacy
web.field_registrywidget isn't picked up by the OWL form parser, socontent_parsedrenders raw${reference}text instead of clickable links. This migrates the widget to OWL (registry.category("fields")+HtmlField), replaces theoe_read_only/oe_edit_onlyCSS toggle (dead in OWL forms) withreadonly="1"/invisible, strips thetarget="_blank"thatretargetLinksadds to internal links, and fixes aMarkupescaping case in_get_page_index.content_parsedis setsanitize=Falseso the renderedoe_direct_lineanchors (data-oe-model/data-oe-id) the widget binds to survive —html_sanitizestrips those attributes. This is safe: the sourcecontentfield is still sanitized and page names arehtml_escaped in_get_page_index, so no unsanitized user input reaches this field.