Skip to content

Commit 53786a3

Browse files
author
Renatho De Carli Rosa
committed
Fix when block or shortcode uses more than one css class
1 parent 641c3ca commit 53786a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntaxhighlighter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ function shortcode_callback( $atts, $code = '', $tag = false ) {
12441244

12451245
// Sanitize the "classname" parameter
12461246
if ( 'class-name' == $key )
1247-
$value = trim( preg_replace( '/[^a-zA-Z0-9 _-]/i', '', $value ) );
1247+
$value = "'" . trim( preg_replace( '/[^a-zA-Z0-9 _-]/i', '', $value ) ) . "'";
12481248

12491249
// Special sanitization for "pad-line-numbers"
12501250
if ( 'pad-line-numbers' == $key ) {

0 commit comments

Comments
 (0)