[wp-trac] [WordPress Trac] #40951: New Text Widget - Switching Between Visual/Text Editor Strips Out Code
WordPress Trac
noreply at wordpress.org
Thu Jul 13 20:48:25 UTC 2017
#40951: New Text Widget - Switching Between Visual/Text Editor Strips Out Code
-------------------------------------------------+-------------------------
Reporter: dwrippe | Owner:
Type: defect (bug) | westonruter
Priority: normal | Status: accepted
Component: Widgets | Milestone: 4.8.1
Severity: major | Version: 4.8
Keywords: needs-testing has-unit-tests has- | Resolution:
patch | Focuses:
-------------------------------------------------+-------------------------
Comment (by Ov3rfly):
A closer look shows another? problem in 4.8 code. Pre-existing html-
comment gets wrapped in <p> when printed to front end, which leads to
extra empty space in front end. Also extra linebreaks are added within the
<p class="some-class>
Pre-existing HTML in text widget, stays like this in 4.8:
{{{
<p class="some-class">Lorem ipsum dolor sit amet, consetetur sadipscing
elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat, sed diam voluptua.</p>
<!-- some comment "lorem ipsum" -->
}}}
view-source of front end, with 4.8:
{{{
<p class="some-class">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua.
</p>
<p><!-- some comment "lorem ipsum" --></p>
}}}
Visitor sees extra empty space due to "non-empty" <p>
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40951#comment:127>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list