WordPress.org

Make WordPress Core

Opened 7 years ago

Last modified 15 months ago

#5161 new enhancement

balance_tags option should not be in the user interface

Reported by: JeremyVisser Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.3
Component: Formatting Keywords: needs-patch dev-feedback
Focuses: Cc:

Description

In the WP Admin → Options → Writing (options-writing.php), there is an option "WordPress should correct invalidly nested XHTML automatically" which controls whether balance_tags() is run on post content or not.

I'm fully supportive of this feature — I think it's important to ensure the HTML that is output to browsers is valid. There have been a few situations where users needed to turn this off, e.g. bugs in the function, or a plugin misbehaves with it on (if I remember correctly, runPHP).

However, this is a KDE-style option where it is put there for a niche case. In 99% of cases, you will want it on.

A few people on the mailing lists have stated a number of times that we should take a GNOME-like approach to these sort of features, and let them be controlled only by plugins. This option is left over from the dark ages of WordPress, and I don't think the cases for turning it off are big enough to warrant its inclusion in the user interface.

If a plugin has a problem with balancing tags (e.g. runPHP), the offending plugin can simply remove the filter.

remove_filter('content_save_pre', 'balance_tags);

(...or whatever the code would be.)

The new canonical redirect feature has far more many problems, and far more justification for it to be turned off, yet I don't see a checkbox "Redirect links to their canonical URL" anywhere in the user interface. If anything should have a checkbox, it's the canonical redirect feature — but, it doesn't have any such thing. So, we should remove this checkbox as well.

Change History (11)

comment:1 Otto427 years ago

I cannot even begin to count the number of times that people complain on the support forums about WordPress messing up their oh-so-perfect HTML that they manually put into the thing.

-1 to this idea. If anything, the option should be expanded in scope to disable all of WordPress's auto-correction features, such as autop and everything else. If somebody wants their text to go unmolested, then that option should be available.

comment:2 JeremyVisser7 years ago

I'm open to that suggestion as well, and considered that as well, but my thoughts started getting too convoluted at around the 4th paragraph of the description, so I declined to include it. ;)

comment:3 caesarsgrunt6 years ago

  • Type changed from defect to enhancement

+1. Actually, I'd like some form of per-post setting, but I think as a generic one it's nearly useless.

Like most people I keep this feature turned on - just as I usually use the visual editor. But it would be nice to be able to disable it on a per-post basis just as easily as one can leave the visual editor and edit the HTML directly.

In fact I should think most people who just switch to the HTML view for a
individual posts don't want the balance_tags filter or any other auto-correction to 'mess up' the HTML they specifically wanted to enter themselves.

But I may be wrong! :)

comment:4 FFEMTcJ5 years ago

  • Keywords dev-feedback needs-patch added
  • Milestone changed from 2.9 to Future Release

comment:5 Denis-de-Bernardy5 years ago

  • Component changed from Administration to UI
  • Keywords dev-feedback removed
  • Milestone changed from Future Release to 2.9
  • Owner anonymous deleted
  • Severity changed from minor to normal

comment:6 Denis-de-Bernardy5 years ago

  • Keywords 2nd-opinion removed

I'd second removing the option from the interface and enforcing this automatically. but only after all of the wp formatting bugs are hunted down and fixed.

comment:7 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.9 to Future Release

comment:8 follow-up: solarissmoke3 years ago

  • Keywords dev-feedback added

4 years later... does anyone still want to see this happen?

comment:9 in reply to: ↑ 8 strider723 years ago

Replying to solarissmoke:

4 years later... does anyone still want to see this happen?

As WordPress development shows such a Jobsianly strong interest (per Matt) in keeping the Core UI simple and letting plugins handle the fringe cases, I'm all for this so long as it can be re-implemented with a plugin for those cases where it's needed.

The only concern I have is the transition. When this hits Core we would definitely have to have that plugin available and let people know about it. (Of course removing the checkbox doesn't have to change existing settings....)

comment:10 DrewAPicture15 months ago

  • Component changed from UI to Administration

comment:11 helen15 months ago

  • Component changed from Administration to Formatting
Note: See TracTickets for help on using tickets.