Make WordPress Core

Opened 19 years ago

Closed 18 years ago

Last modified 7 years ago

#2647 closed defect (bug) (fixed)

wptexturize function curlifies quotes in script blocks

Reported by: justinsomnia's profile 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 19 years ago.
patch fixing the parenthesis error

Download all attachments as: .zip

Change History (4)

@Justinsomnia
19 years ago

patch fixing the parenthesis error

#1 @westi
19 years ago

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

Attached patch works well.

Good Catch!

#2 @matt
18 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

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


7 years ago

Note: See TracTickets for help on using tickets.