Make WordPress Core

Opened 5 years ago

Last modified 3 months ago

#8213 accepted enhancement

WP text formatting functions handle block-level INS tag incorrectly

Reported by: misieg772 Owned by: markjaquith
Milestone: Future Release Priority: low
Severity: minor Version: 2.7
Component: Formatting Keywords: needs-patch wpautop
Focuses: Cc:


From W3C documentation:

"INS and DEL are used to markup sections of the document that have been inserted or deleted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).

These two elements are unusual for HTML in that they may serve as either BLOCK-LEVEL or INLINE elements (but not both). They may contain one or more words within a paragraph or contain one or more block-level elements such as paragraphs, lists and tables."

When I want to use INS tag as BLOCK-LEVEL element (to wrap to paragraphs for example) wrong HTML is produced:

<p><ins datetime="2008-11-14T14:45:27+00:00">First paragraph.</p>
<p>Second paragraph.</ins></p>

Correct HTML should look like this:

<ins datetime="2008-11-14T14:45:27+00:00"><p>First paragraph.</p>
<p>Second paragraph.</p></ins>

I think the same sitiuation occurs for DEL tag.

Change History (8)

comment:1 markjaquith5 years ago

  • Milestone changed from 2.7 to 2.8
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned
  • Version set to 2.7

I use insert the same way... I'll look into this for 2.8

comment:2 ryan5 years ago

  • Component changed from General to Formatting

comment:3 Denis-de-Bernardy5 years ago

  • Keywords has-patch needs-testing added; formatting ins wpautop html removed

comment:4 Denis-de-Bernardy5 years ago

  • Component changed from Formatting to Template

comment:5 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch needs-testing removed
  • Milestone changed from 2.8 to Future Release

comment:6 Denis-de-Bernardy5 years ago

  • Component changed from Template to Formatting
  • Priority changed from normal to low
  • Severity changed from normal to minor

comment:7 Denis-de-Bernardy5 years ago

  • Type changed from defect (bug) to enhancement

comment:8 nacin3 months ago

  • Keywords wpautop added
Note: See TracTickets for help on using tickets.