Make WordPress Core

Opened 16 years ago

Closed 5 years ago

#8213 closed defect (bug) (wontfix)

WP text formatting functions handle block-level INS tag incorrectly

Reported by: misieg772's profile misieg772 Owned by: markjaquith's profile markjaquith
Milestone: Priority: low
Severity: normal Version: 2.7
Component: Formatting Keywords: needs-patch needs-unit-tests 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 (12)

#1 @markjaquith
16 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

#2 @ryan
15 years ago

  • Component changed from General to Formatting

#3 @Denis-de-Bernardy
15 years ago

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

#4 @Denis-de-Bernardy
15 years ago

  • Component changed from Formatting to Template

#5 @Denis-de-Bernardy
15 years ago

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

#6 @Denis-de-Bernardy
15 years ago

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

#7 @Denis-de-Bernardy
15 years ago

  • Type changed from defect (bug) to enhancement

#8 @nacin
10 years ago

  • Keywords wpautop added

#9 @chriscct7
9 years ago

  • Keywords wpautop removed
  • Milestone Future Release deleted
  • Priority changed from low to normal
  • Resolution set to maybelater
  • Severity changed from minor to normal
  • Status changed from accepted to closed

Closing as maybelater. Complete lack of interest on the bug on the ticket over the last 6 years. Feel free to reopen when more interest re-emerges (particularly if there's a patch).

#10 @johnbillion
9 years ago

  • Keywords needs-unit-tests added
  • Milestone set to Awaiting Review
  • Priority changed from normal to low
  • Resolution maybelater deleted
  • Status changed from closed to reopened
  • Type changed from enhancement to defect (bug)

No interest, but it's still a valid bug.

#11 @miqrogroove
9 years ago

  • Keywords wpautop added

#12 @pento
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed

Given that these tags can be both block and inline level, it's not possible for wpautop() to distinguish which one was intended, so I'm going to close this ticket as something we can't fix.

Note: See TracTickets for help on using tickets.