Opened 6 years ago
Last modified 5 years ago
#45829 new defect (bug)
New editor replaces > with > within <pre> tag
Reported by: | yannsalmon | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | major | Version: | 5.0.2 |
Component: | Editor | Keywords: | dev-feedback needs-patch |
Focuses: | javascript | Cc: |
Description
Hi,
I just updated to WordPress 5 and started using the new block editor.
I typeset source code in my posts using a <pre> tag. This code contains a > comparison operator. Upon saving my draft, > gets replaced with >, and this entity is also displayed in the article preview.
This happens even if I disable the visual editor.
The old editor does not present this bug and installing the Classic Editor extension allowed me to work around this.
Change History (2)
Note: See
TracTickets for help on using
tickets.
You are right!
Actually the behavior is quite strange. I have the following code:
When I look into HTML it turns to
Not all
<
are converted to<
<br>
,<p>
and</p>
all are fine.For hand written HTML tags like
pre
anddiv
,>
are not converted to>
.It looks like default HTML tags rendered by Gutenberg are fine. The strange behavior starts with HTML tags we write by hand!