[wp-trac] [WordPress Trac] #32867: Wordpress replaces HTML entities for angle brackets in titles, breaking HTML validation
WordPress Trac
noreply at wordpress.org
Thu Jul 2 21:46:57 UTC 2015
#32867: Wordpress replaces HTML entities for angle brackets in titles, breaking
HTML validation
--------------------------+-----------------------------
Reporter: CRCulver | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.2.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
In the scientific field I blog about, the opening and closing angle
brackets are technical symbols. Because in valid HTML these symbols must
always be escaped, I typically write them in the Wordpress post editor
with their HTML entities: `<` and `>`.
In the body of a post, Wordpress preserves those HTML entities as HTML
entities, so the result is conformant HTML. However, when I enter those
HTML entities into the Title field for a post, and then click Save,
Wordpress replaces the HTML entity with the actual character.
Consequently, the page is not valid HTML, and the W3C validator for
instance will throw up an error due to an unescaped angle bracket.
Note that this does not happen with the other HTML entities for these
particular symbols: `<` and `>`. If those are entered into the Title
field of a post, they survive after the user clicks Save. So, `<` and
`>` should get the same treatment.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32867>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list