#59480 closed defect (bug) (fixed)
Harden/modernize JS in WP_Customize_Manager::remove_frameless_preview_messenger_channel()
Reported by: | westonruter | Owned by: | nicolefurlan |
---|---|---|---|
Milestone: | 6.4 | Priority: | low |
Severity: | normal | Version: | 4.7 |
Component: | Customize | Keywords: | has-patch has-testing-info |
Focuses: | javascript | Cc: |
Description
As pointed out by @dmsnell a PR comment for #58664, the JS logic in WP_Customize_Manager::remove_frameless_preview_messenger_channel()
can be hardened/modernized. We can leverage URLSearchParams
as well as URL
rather than hacking with document.createElement('a')
. This is similar to what was done for wp-embed
in r56383.
Attachments (1)
Change History (12)
This ticket was mentioned in PR #5345 on WordPress/wordpress-develop by @nicolefurlan.
15 months ago
#2
- Keywords has-patch added; needs-patch removed
Hardens/modernizes the JavaScript in WP_Customize_Manager::remove_frameless_preview_messenger_channel()
, leveraging URL
instead of document.createElement('a')
.
Trac ticket: https://core.trac.wordpress.org/ticket/59480
#3
@
15 months ago
- Keywords has-testing-info needs-testing added
- Owner set to nicolefurlan
- Status changed from new to assigned
Testing Instructions
- On
/wp-admin/themes.php
, live preview a theme that does not use full site editing (Twenty Twenty-One or older) by clicking "Live Preview" on one of the themes. - On
/wp-admin/customize.php
, open up dev tools and inspect the DOM to find theiframe
within#customize-preview
. - Open the URL in the
data-src
attribute in a new tab. - Verify that the
customize_messenger_channel
URL parameter is removed, and that the admin bar is shown.
This ticket was mentioned in Slack in #core-test by nicolefurlan. View the logs.
15 months ago
#5
follow-up:
↓ 6
@
15 months ago
@nicolefurlan Thank you for the patch! FYI: No need to attach a patch as you can see the GitHub PR is automatically linked above. I'll review your PR.
#6
in reply to:
↑ 5
@
15 months ago
Replying to westonruter:
@nicolefurlan Thank you for the patch! FYI: No need to attach a patch as you can see the GitHub PR is automatically linked above. I'll review your PR.
Thank you! That's good to know. This was my first core contribution so I wasn't totally sure :)
#7
@
15 months ago
@westonruter I did update the patch in this ticket to reflect the changes we discussed in the PR, just to make sure things stay consistent. But going forward, I won't bother adding a patch. 👍
@westonruter commented on PR #5345:
15 months ago
#9
Committed in r56749. Congratulations on your first core contribution!
#10
follow-up:
↓ 11
@
14 months ago
@westonruter as this ticket is closed as a fix, does it still needs its other keywords listed, eg good first bug, needs testing etc? I am just going through tickets in the milestone by component to re-check for the Field Guide and Dev notes, and came across this. Thanks.
#11
in reply to:
↑ 10
@
14 months ago
- Keywords good-first-bug needs-testing removed
Replying to webcommsat:
@westonruter as this ticket is closed as a fix, does it still needs its other keywords listed, eg good first bug, needs testing etc? I am just going through tickets in the milestone by component to re-check for the Field Guide and Dev notes, and came across this. Thanks.
I removed good-first-bug
and needs-testing
.
yes, it can be done, I think so.