Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Avoid double encoding in encode_shortcode_contents_callback

By: a guest on May 8th, 2013  |  syntax: None  |  size: 0.26 KB  |  views: 74  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. 423c423
  2. <               $code = str_replace( array_keys($this->specialchars), array_values($this->specialchars), htmlspecialchars( $code ) );
  3. ---
  4. >                 $code = strtr( htmlspecialchars( $code, ENT_COMPAT | ENT_HTML401, 'UTF-8', false ), $this->specialchars );
clone this paste RAW Paste Data