Skip to:

Opened 11 years ago

Last modified 6 years ago

#2357 new idea

Design Crashes! - Li button issue - Editor not filtering improper HTML usage.

Reported by: pebbleontheshore's profile Pebbleontheshore Owned by:
Milestone: Future Release Priority: normal
Severity: major Version: 2.1
Component: API - Formatting Keywords: needs-patch needs-unit-tests


When I create a topic or reply for a topic, if I click "li" button without "ul" or "ol" and submit the whole design crashes. When the participant user unknowingly do this this will be a problem. Then I disabled fancy editor and also tried <li>test</li> same thing happens. The design crashes. It shows if the end user gives improper or illogical html syntax within the content box the design breaks.

Attachments (1)

help-bbPress!.jpg (97.8 KB) - added by Pebbleontheshore 11 years ago.
Li button issue design crash!

Download all attachments as: .zip

Change History (12)

11 years ago

Li button issue design crash!

#1 @johnjamesjacoby
11 years ago

  • Component changed from Forums to Formatting
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Priority changed from highest to normal
  • Severity changed from critical to major
  • Type changed from defect to feature request

Unfortunately, this is indicative of a larger problem in WordPress's force_balance_tags() function, which is that there is no routine or code for repairing invalid markup if parent tags are missing but child tags are present.

It's definitely annoying. The visual editor did originally bypass this problem, but introduced others related to posting code snippets.

Going to move this into Future Release, so we can keep an eye on this, and iterate on how this works over time.

Thanks for the report!

#2 @johnjamesjacoby
9 years ago

  • Type changed from feature request to idea

#3 @netweb
8 years ago

  • Keywords needs-unit-tests added

This ticket was mentioned in Slack in #bbpress by netweb. View the logs.

8 years ago

#5 @netweb
8 years ago

Via Robkk in #2967:

If a user creates an html list without any surrounding tags defining the order to display the list in a topic or reply, the layout of the topic will break. Users in the support forum on do this all the time.

To test just post something like this in a topic or reply in your test forum.


#6 @netweb
8 years ago

#2967 was marked as a duplicate

#7 @Track77
7 years ago

As a temporary solution i using this code.

add_filter('bbp_get_reply_content', 'fix_li_tags');
function fix_li_tags( $content) {
    return "<ul>$content</ul>";

#8 @netweb
7 years ago

Also creating a post with the following content breaks the layout on and support forums



And discussion

#10 @SergeyBiryukov
7 years ago

There's an experimental patch on #meta20 that could be used as a base for potential fix.

Last edited 7 years ago by SergeyBiryukov (previous) (diff)

This ticket was mentioned in Slack in #forums by clorith. View the logs.

6 years ago

Note: See TracTickets for help on using tickets.