I installed the SyntaxHighlighter Evolved plugin yesterday to display WordPress and Stata code fragments.
Unfortunately, the ampersand (&) was displayed as &
. A simple Google search informed me that this was a known issue.
The solution I found involved adding the following code (derived from this support thread) in the functions.php file of the active skin of Dynamik Website Builder, running on the Genesis Framework.
//* Fix display of ampersands when using SyntaxHighlighter Evolved plugin function kagg_syntaxhighlighter_precode( $code, $atts, $tag ) { if ( 'code' === $tag ) { $code = wp_specialchars_decode( $code, ENT_QUOTES ); } return $code; } add_filter( 'syntaxhighlighter_precode', 'kagg_syntaxhighlighter_precode', 10, 3 );
Leave a Reply