Make WordPress Core

Opened 13 years ago

Closed 10 years ago

Last modified 10 years ago

#23083 closed enhancement (fixed)

Tag balancing for text widgets

Reported by: mark-k's profile mark-k Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Widgets Keywords: has-patch
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 (3)

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

Download all attachments as: .zip

Change History (11)

#1 @rachelbaker
13 years ago

  • Cc rachelbaker added

@MikeHansenMe
12 years ago

adds tag balancing to text widget

#2 follow-up: @MikeHansenMe
12 years 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.

#3 in reply to: ↑ 2 @mark-k
12 years 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?

@MikeHansenMe
12 years ago

uses balanceTags instead of force_balance_tags to make use optional

#4 @MikeHansenMe
12 years 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.

#5 @MikeHansenMe
12 years ago

  • Keywords has-patch needs-testing added

#6 @MikeHansenMe
10 years ago

Patch still applies

#7 @wonderboymusic
10 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 35103:

Widgets: add a default filter for widget_text (used by the Text widget), balanceTags, which respects the option for use_balanceTags.

Props MikeHansenMe.
Fixes #23083.

#8 @wonderboymusic
10 years ago

  • Keywords needs-testing removed
  • Milestone changed from Awaiting Review to 4.4
Note: See TracTickets for help on using tickets.