[wp-trac] [WordPress Trac] #42971: Page editor (TinyMCE) strips preformatted code entered inside <pre><code> tags.
WordPress Trac
noreply at wordpress.org
Sat Dec 23 23:57:05 UTC 2017
#42971: Page editor (TinyMCE) strips preformatted code entered inside <pre><code>
tags.
--------------------------+-----------------------------
Reporter: Sakis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: 4.9.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Edit some page or post
Switch editor to text
Enter the following snippet
{{{
<pre>
<code>
/* Just for testing purposes */
#include <stdio.h>
main()
{
printf("Hello World");
}
</code>
</pre>
}}}
Save, publish or switch to visual
Voila, "<stdio.h>" part is stripped out from both visual editor and page
when rendered.
PS: Tested with clean installed WP, no plugins or third party themes, with
Chrome, Edge and Safari browsers in Win10 and MacOS X
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42971>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list