Skip to:
Content

bbPress.org

Opened 11 years ago

Last modified 4 months 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
Cc:

Description

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 (13)

@Pebbleontheshore
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
10 years ago

  • Type changed from feature request to idea

#3 @netweb
9 years ago

  • Keywords needs-unit-tests added

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


9 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 bbpress.org do this all the time.

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

<li></li>
<li></li>
<li></li>

https://bbpress.trac.wordpress.org/raw-attachment/ticket/2967/forum%20post%20list%20messup.jpg

#6 @netweb
8 years ago

#2967 was marked as a duplicate

#7 @Track77
8 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
8 years ago

Also creating a post with the following content breaks the layout on w.org and bbpress.org support forums

<li>
<ol>
first
</ol>
<ol>
second
</ol>
</li>

See https://wordpress.org/support/topic/code-blocks-ordered-lists/

And discussion https://wordpress.slack.com/archives/forums/p1488244520914118

#10 @SergeyBiryukov
8 years ago

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

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

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


7 years ago

#12 @johnjamesjacoby
4 months ago

#3606 was marked as a duplicate.

Note: See TracTickets for help on using tickets.