WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2060 closed defect (bug) (duplicate)

Text gets texturized in <pre>, <code> if the block contains a tag

Reported by: allan Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.1
Component: General Keywords:
Focuses: Cc:

Description

If a <code>, <pre>, etc. block contain a tag, then text after that tag gets the usual treatment (smart quotes etc.).

E.g. this text: <pre>"foo"<br>"bar"</pre>

Becomes (after the wptexturize filter): <pre>"foo"<br>&#8220;bar&#8221;</pre>

Attachments (1)

wptexturize_no_mangling_in_code.patch (1.4 KB) - added by allan 8 years ago.
Patch to fix the problem

Download all attachments as: .zip

Change History (4)

allan8 years ago

Patch to fix the problem

comment:1 Justinsomnia8 years ago

  • Summary changed from Text gets mangled in <code> etc. if the block contain a tag to Text gets texturized in <pre>, <code> if the block contains a tag
  • Version changed from 1.5.2 to 2.0.1

Confirming this is still an issue in v2.0.1

Another test case:

<pre>"test"<strong>"test"</strong>"test"</pre>

is transformed into:

<pre>"test"<strong>&#8220;test&#8221;</strong>&#8220;test&#8221;</pre>

comment:2 Justinsomnia8 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

comment:3 Justinsomnia8 years ago

Oops thought it would ask me. This is a duplicate of #1290.

Note: See TracTickets for help on using tickets.