Opened 11 years ago
Last modified 5 months ago
#2357 new idea
Design Crashes! - Li button issue - Editor not filtering improper HTML usage.
Reported by: | 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)
Change History (13)
#1
@
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!
This ticket was mentioned in Slack in #bbpress by netweb. View the logs.
9 years ago
#5
@
8 years ago
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>
#7
@
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
@
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
@
8 years ago
There's an experimental patch on #meta20 that could be used as a base for potential fix.
Li button issue design crash!