Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#9599 closed enhancement (wontfix)

Allow pre tags in comments

Reported by: nbachiyski Owned by:
Milestone: Priority: lowest
Severity: minor Version: 2.8
Component: Comments Keywords:
Focuses: Cc:


Sometimes I want to add a code snippet in comments, but the pre tag isn't allowed there. It will be pretty harmless, since we won't allow any attributes.

Attachments (1)

pre-in-comments.diff (358 bytes) - added by nbachiyski 5 years ago.

Download all attachments as: .zip

Change History (9)

nbachiyski5 years ago

comment:1 Denis-de-Bernardy5 years ago

  • Keywords tested added; kses removed
  • Milestone changed from Future Release to 2.8

comment:2 JohnLamansky5 years ago

The pre tag could let a commenter "break out" of the page's layout though.

comment:3 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch tested removed

correct. and it would only really make sense if its contents is htmlspecialchar'd afterwards.

comment:4 Denis-de-Bernardy5 years ago

  • Keywords 2nd-opinion added

comment:5 janeforshort5 years ago

  • Milestone changed from 2.8 to Future Release

Punting to be evaluated in next development cycle due to time constraints.

comment:6 Denis-de-Bernardy5 years ago

  • Keywords 2nd-opinion removed

comment:7 Denis-de-Bernardy5 years ago

  • Keywords close added

suggesting we close this, too.

comment:8 johnbillion4 years ago

  • Keywords needs-patch close removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

You should use the <code> tag for code snippets. Most themes style this with a monospace font and most code block styling plugins work off this tag too.

Don't see any other need for <pre> tags in comments.

Note: See TracTickets for help on using tickets.