Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a subset of HTML tags for Multiple Choices label rendering #2185

Merged

Conversation

Soare-Robert-Daniel
Copy link
Contributor

Closes #2091

Summary

Instead of escaping the HTML, I used the wp_kses to clean and allow only a subset of HTML tags.

Screenshots

Screenshot 2024-04-17 at 17 36 03 Screenshot 2024-04-17 at 17 36 31

Test instructions

  1. Insert a Form and a multiple choices field.
  2. In the field label, select the text and add a link using the native widget.
  3. Check if the link is present in Frontend(Page Preview)

Checklist before the final review

  • Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review April 17, 2024 14:42
@pirate-bot
Copy link
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 239.1 KB 239.1 KB 0 B (0.00%)
Blocks 1.5 MB 1.5 MB 0 B (0.00%)
CSS 93.17 KB 93.17 KB 0 B (0.00%)
Dashboard 201.53 KB 201.53 KB 0 B (0.00%)
Onboarding 154.18 KB 154.18 KB 0 B (0.00%)
Export Import 90.95 KB 90.95 KB 0 B (0.00%)
Pro 355.91 KB 355.91 KB 0 B (0.00%)

@pirate-bot
Copy link
Contributor

Plugin build for 123e8e9 is ready 🛎️!

@Soare-Robert-Daniel Soare-Robert-Daniel linked an issue Apr 17, 2024 that may be closed by this pull request
@pirate-bot
Copy link
Contributor

E2E Tests

Playwright Test Status:

Performance Results serverResponse: 222.85, firstPaint: 552.7, domContentLoaded: 1575.25, loaded: 1575.75, firstContentfulPaint: 3647.2, firstBlock: 5631.25, type: 12.94, minType: 11.52, maxType: 15.87, typeContainer: 8.06, minTypeContainer: 6.86, maxTypeContainer: 10.32, focus: 43.07, minFocus: 39.2, maxFocus: 49.84, inserterOpen: 28.83, minInserterOpen: 26.35, maxInserterOpen: 33.37, inserterSearch: 6.85, minInserterSearch: 6.35, maxInserterSearch: 7.86, inserterHover: 3.55, minInserterHover: 2.92, maxInserterHover: 5.1, listViewOpen: 154.81, minListViewOpen: 137.33, maxListViewOpen: 192.29

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Apr 18, 2024
@Soare-Robert-Daniel Soare-Robert-Daniel merged commit cf729b1 into development Apr 18, 2024
21 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the fix/label-rendering-multiple-choices branch April 18, 2024 07:05
@Soare-Robert-Daniel Soare-Robert-Daniel mentioned this pull request Apr 18, 2024
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 2.6.11 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added released Indicate that an issue has been resolved and released in a particular version of the product. pr-checklist-complete The Pull Request checklist is complete. (automatic label) labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-checklist-complete The Pull Request checklist is complete. (automatic label) released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link in checkbox field not working anymore
3 participants