WordPress.org

Make WordPress Core

Opened 19 months ago

Last modified 18 months ago

#23083 new enhancement

Tag balancing for text widgets

Reported by: mark-k Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Widgets Keywords: has-patch needs-testing
Focuses: Cc:

Description

Based on inspecting the code it looks like tag balancing is not applied to th content of the text widget.

IMO people are more likely to produce broken HTML when adding HTML in a text widget then when writing post, but tag balancing is done only for posts and comments (in which HTML is rarely used).

Attachments (2)

23083.diff (469 bytes) - added by MikeHansenMe 18 months ago.
adds tag balancing to text widget
23083.2.diff (462 bytes) - added by MikeHansenMe 18 months ago.
uses balanceTags instead of force_balance_tags to make use optional

Download all attachments as: .zip

Change History (7)

comment:1 rachelbaker19 months ago

  • Cc rachelbaker added

MikeHansenMe18 months ago

adds tag balancing to text widget

comment:2 follow-up: MikeHansenMe18 months ago

  • Cc mdhansen@… added

The patch only changes the way the code is displayed on the front. It does not alter the html input. There may need to be a similar js implementation.

comment:3 in reply to: ↑ 2 mark-k18 months ago

@MikeHansenMe, isn't it better to hook balanceTags to get the use_balanceTags option into play in case there are people that don't want balancing?

MikeHansenMe18 months ago

uses balanceTags instead of force_balance_tags to make use optional

comment:4 MikeHansenMe18 months ago

@mark-k I was thinking mostly of people copying code snippets without knowledge of the code. Perhaps we would be doing them a favor but in the end I think you are right. It should be optional.

comment:5 MikeHansenMe18 months ago

  • Keywords has-patch needs-testing added
Note: See TracTickets for help on using tickets.