WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#2647 closed defect (bug) (fixed)

wptexturize function curlifies quotes in script blocks

Reported by: Justinsomnia Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: General Keywords: bg|has-patch bg|commit bg|tested
Focuses: Cc:

Description

Due to a misplaced parenthesis in the wptexturize function, quotes in a script block within a post will get texturized, breaking the script.

The following test post:

<script>document.write("test");</script>

erroneously gets sent to the web broswer as:

<script>document.write(&#8221;test&#8221;);</script>

Attachments (1)

functions-formatting.php.diff (621 bytes) - added by Justinsomnia 8 years ago.
patch fixing the parenthesis error

Download all attachments as: .zip

Change History (3)

Justinsomnia8 years ago

patch fixing the parenthesis error

comment:1 westi8 years ago

  • Keywords bg|has-patch bg|commit bg|tested added
  • Milestone set to 2.1

Attached patch works well.

Good Catch!

comment:2 matt7 years ago

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

(In [4565]) Don't texturize things inside of script or style tags, fixes #2647

Note: See TracTickets for help on using tickets.