Skip to content

Broadcasts: Importer: Permit Divider and Heading HTML Tags - #1244

Open
n7studios wants to merge 2 commits into
update-test-plugins-urlsfrom
wp-97-wp-import-missing-styles
Open

n7studios wants to merge 2 commits into
update-test-plugins-urlsfrom
wp-97-wp-import-missing-styles

Conversation

@n7studios

@n7studios n7studios commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When importing Broadcasts to WordPress Posts, dividers (<hr>) were removed, because they weren't in the list of permitted HTML tags. This happened regardless of the Disable Styles setting.

h4, h5 and h6 were also missing from the list, so their text was imported as plain text without the heading.

This PR adds hr, h4, h5 and h6 to the permitted HTML tags:

  • When Disable Styles is disabled, dividers retain their inline styles.
  • When Disable Styles is enabled, dividers are imported as <hr>, with inline styles removed.

Testing

  • testImportBroadcastHTMLElements: Imports a mocked Broadcast containing every permitted element, plus elements that should be removed, with Disable Styles both disabled and enabled. Asserts that:
    • permitted elements are retained;
    • layout elements and inline styles are retained or removed, depending on the Disable Styles setting;
    • non-permitted tags are removed, retaining their text;
    • the title heading, <style> blocks, polls, the unsubscribe section, empty non-editable table cells and the tracking pixel are removed.

Checklist

@n7studios n7studios added this to the 3.4.7 milestone Oct 12, 2026
@n7studios n7studios self-assigned this Oct 12, 2026
@n7studios
n7studios changed the base branch from main to update-test-plugins-urls October 14, 2026 03:24
@github-actions

Copy link
Copy Markdown

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios
n7studios marked this pull request as ready for review October 14, 2026 09:53
@n7studios
n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team October 14, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants