[wp-trac] [WordPress Trac] #39377: wpautop adds a extra </p>
WordPress Trac
noreply at wordpress.org
Wed Mar 8 17:43:41 UTC 2017
#39377: wpautop adds a extra </p>
--------------------------+------------------------------
Reporter: pbearne | Owner: azaozz
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 4.7
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------+------------------------------
Changes (by azaozz):
* keywords: has-unit-tests dev-feedback has-patch => dev-feedback
Comment:
Replying to [comment:4 pbearne]:
> I had a quick look at the function again and saw that where are handling
<option> to fix the same problem so I have been able to add similar code
to strip line breaks before and after <span> elements
As I said above this will introduce numerous regressions. All spans that
are not immediately inside a block element will be affected. Also all <br>
around spans will be gone. Couple of cases:
`1 <span>2</span> 3` will render as `123` instead of `1 2 3`
{{{
1 <span>2</span>
3
}}}
will render as `123` instead of
{{{
1 2
3
}}}
I still don't see a good way to fix this apart from reverting [38592].
> I had a quick look at the function again and saw that where are handling
<option> to fix the same problem
Yes, that works for <option> as it is only allowed in <select>.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39377#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list