#49337 closed defect (bug) (invalid)
Post title changed after publication if a <tag> is found by adding </tag>
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
WordPress 5.3.2
Theme Twenty Twenty
A post title of
Bert & Ernie’s <banana> festival
becomes
Bert & Ernie’s festival
on the frontend after publication and gets a slug of bert-ernies-festival
The backend is keeping the full title with the <banana> inside when I check the posts.
- Where did the banana go in displaying the title (or is this 2020 issue?)
- Should the slug not be picking up words that are non existing tags? A post with just <whatever> as a title will result in post slug '123' (the post ID)
Thanks!
Change History (2)
Note: See
TracTickets for help on using
tickets.
Users with administrator or editor roles are allowed to use HTML in post titles. In your case
<banana>
is a HTML tag and will be rendered as such by the browser. Browser are also trying to fix invalid HTML and makes it<banana>festival</banana>
.If you want to have the tag rendered as a string (and used in the slug) you have to use HTML entities:
<banana>
.