Version Description
Download this release
Release Info
Developer | Viper007Bond |
Plugin | SyntaxHighlighter Evolved |
Version | 3.1.5 |
Comparing to | |
See all releases |
Code changes from version 3.1.4 to 3.1.5
- readme.txt +4 -0
- syntaxhighlighter.php +4 -29
readme.txt
CHANGED
@@ -55,6 +55,10 @@ Make sure your theme's `footer.php` file has `<?php wp_footer(); ?>` somewhere i
|
|
55 |
|
56 |
== ChangeLog ==
|
57 |
|
|
|
|
|
|
|
|
|
58 |
= Version 3.1.4 =
|
59 |
|
60 |
* WordPress 3.6 (alpha) compatibility. Content is now being stripped of slashes before being run through filters so this plugin needs to stop trying to strip slashes and then adding them back. See [ticket #21767](http://core.trac.wordpress.org/ticket/21767).
|
55 |
|
56 |
== ChangeLog ==
|
57 |
|
58 |
+
= Version 3.1.5 =
|
59 |
+
|
60 |
+
* The slashing changes made in WordPress 3.6 (alpha) have been reverted -- we're back to the old way again. This release restores the code back to Syntaxhighlighter v3.1.3. See [ticket #21767](http://core.trac.wordpress.org/ticket/21767).
|
61 |
+
|
62 |
= Version 3.1.4 =
|
63 |
|
64 |
* WordPress 3.6 (alpha) compatibility. Content is now being stripped of slashes before being run through filters so this plugin needs to stop trying to strip slashes and then adding them back. See [ticket #21767](http://core.trac.wordpress.org/ticket/21767).
|
syntaxhighlighter.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
Plugin Name: SyntaxHighlighter Evolved
|
6 |
Plugin URI: http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/
|
7 |
-
Version: 3.1.
|
8 |
Description: Easily post syntax-highlighted code to your site without having to modify the code at all. Uses Alex Gorbatchev's <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">SyntaxHighlighter</a>. <strong>TIP:</strong> Don't use the Visual editor if you don't want your code mangled. TinyMCE will "clean up" your HTML.
|
9 |
Author: Viper007Bond
|
10 |
Author URI: http://www.viper007bond.com/
|
@@ -21,7 +21,7 @@ Thanks to:
|
|
21 |
|
22 |
class SyntaxHighlighter {
|
23 |
// All of these variables are private. Filters are provided for things that can be modified.
|
24 |
-
var $pluginver = '3.1.
|
25 |
var $agshver = false; // Alex Gorbatchev's SyntaxHighlighter version (dynamically set below due to v2 vs v3)
|
26 |
var $shfolder = false; // Controls what subfolder to load SyntaxHighlighter from (v2 or v3)
|
27 |
var $settings = array(); // Contains the user's settings
|
@@ -36,8 +36,6 @@ class SyntaxHighlighter {
|
|
36 |
|
37 |
// Initalize the plugin by registering the hooks
|
38 |
function __construct() {
|
39 |
-
global $wp_version;
|
40 |
-
|
41 |
if ( ! function_exists( 'esc_html' ) )
|
42 |
return;
|
43 |
|
@@ -50,13 +48,8 @@ class SyntaxHighlighter {
|
|
50 |
add_filter( 'bp_get_the_topic_post_content', array( &$this, 'parse_shortcodes' ), 7 ); // BuddyPress
|
51 |
|
52 |
// Into the database
|
53 |
-
|
54 |
-
|
55 |
-
add_filter( 'pre_comment_content', array( &$this, 'encode_shortcode_contents' ), 1 ); // Comments
|
56 |
-
} else {
|
57 |
-
add_filter( 'content_save_pre', array( &$this, 'encode_shortcode_contents_slashed_noquickedit' ), 1 ); // Posts
|
58 |
-
add_filter( 'pre_comment_content', array( &$this, 'encode_shortcode_contents_slashed' ), 1 ); // Comments
|
59 |
-
}
|
60 |
add_filter( 'group_forum_post_text_before_save', array( &$this, 'encode_shortcode_contents_slashed' ), 1 ); // BuddyPress
|
61 |
add_filter( 'group_forum_topic_text_before_save', array( &$this, 'encode_shortcode_contents_slashed' ), 1 ); // BuddyPress
|
62 |
|
@@ -406,24 +399,6 @@ class SyntaxHighlighter {
|
|
406 |
}
|
407 |
|
408 |
|
409 |
-
// HTML entity encode the contents of shortcodes. Expects slashed content. Aborts if AJAX.
|
410 |
-
function encode_shortcode_contents_noquickedit( $content ) {
|
411 |
-
|
412 |
-
// In certain weird circumstances, the content gets run through "content_save_pre" twice
|
413 |
-
// Keep track and don't allow this filter to be run twice
|
414 |
-
// I couldn't easily figure out why this happens and didn't bother looking into it further as this works fine
|
415 |
-
if ( true == $this->content_save_pre_ran )
|
416 |
-
return $content;
|
417 |
-
$this->content_save_pre_ran = true;
|
418 |
-
|
419 |
-
// Post quick edits aren't decoded for display, so we don't need to encode them (again)
|
420 |
-
if ( ! empty( $_POST ) && !empty( $_POST['action'] ) && 'inline-save' == $_POST['action'] )
|
421 |
-
return $content;
|
422 |
-
|
423 |
-
return $this->encode_shortcode_contents( $content );
|
424 |
-
}
|
425 |
-
|
426 |
-
|
427 |
// HTML entity encode the contents of shortcodes. Expects slashed content. Aborts if AJAX.
|
428 |
function encode_shortcode_contents_slashed_noquickedit( $content ) {
|
429 |
|
4 |
|
5 |
Plugin Name: SyntaxHighlighter Evolved
|
6 |
Plugin URI: http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/
|
7 |
+
Version: 3.1.5
|
8 |
Description: Easily post syntax-highlighted code to your site without having to modify the code at all. Uses Alex Gorbatchev's <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">SyntaxHighlighter</a>. <strong>TIP:</strong> Don't use the Visual editor if you don't want your code mangled. TinyMCE will "clean up" your HTML.
|
9 |
Author: Viper007Bond
|
10 |
Author URI: http://www.viper007bond.com/
|
21 |
|
22 |
class SyntaxHighlighter {
|
23 |
// All of these variables are private. Filters are provided for things that can be modified.
|
24 |
+
var $pluginver = '3.1.5'; // Plugin version
|
25 |
var $agshver = false; // Alex Gorbatchev's SyntaxHighlighter version (dynamically set below due to v2 vs v3)
|
26 |
var $shfolder = false; // Controls what subfolder to load SyntaxHighlighter from (v2 or v3)
|
27 |
var $settings = array(); // Contains the user's settings
|
36 |
|
37 |
// Initalize the plugin by registering the hooks
|
38 |
function __construct() {
|
|
|
|
|
39 |
if ( ! function_exists( 'esc_html' ) )
|
40 |
return;
|
41 |
|
48 |
add_filter( 'bp_get_the_topic_post_content', array( &$this, 'parse_shortcodes' ), 7 ); // BuddyPress
|
49 |
|
50 |
// Into the database
|
51 |
+
add_filter( 'content_save_pre', array( &$this, 'encode_shortcode_contents_slashed_noquickedit' ), 1 ); // Posts
|
52 |
+
add_filter( 'pre_comment_content', array( &$this, 'encode_shortcode_contents_slashed' ), 1 ); // Comments
|
|
|
|
|
|
|
|
|
|
|
53 |
add_filter( 'group_forum_post_text_before_save', array( &$this, 'encode_shortcode_contents_slashed' ), 1 ); // BuddyPress
|
54 |
add_filter( 'group_forum_topic_text_before_save', array( &$this, 'encode_shortcode_contents_slashed' ), 1 ); // BuddyPress
|
55 |
|
399 |
}
|
400 |
|
401 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
// HTML entity encode the contents of shortcodes. Expects slashed content. Aborts if AJAX.
|
403 |
function encode_shortcode_contents_slashed_noquickedit( $content ) {
|
404 |
|