Ticket #2647 (closed defect (bug): fixed)

Opened 6 years ago

Last modified 5 years ago

wptexturize function curlifies quotes in script blocks

Reported by: Justinsomnia Owned by: anonymous
Priority: normal Milestone: 2.1
Component: General Version: 2.1
Severity: normal Keywords: bg|has-patch bg|commit bg|tested
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

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

Change History

patch fixing the parenthesis error

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

Attached patch works well.

Good Catch!

comment:2   matt5 years ago

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

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

Note: See TracTickets for help on using tickets.