Skip to content

Commit accd3bf

Browse files
update
1 parent 5570f70 commit accd3bf

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

inc/CodeSnippet/CodeSnippetFrontend.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ private function execute_css_snippet( $content ) {
552552
private function execute_javascript_snippet( $content ) {
553553
if ( ! empty( $content ) ) {
554554
echo '<script type="text/javascript">' . "\n";
555-
echo esc_js( $content ) . "\n";
555+
echo wp_strip_all_tags( $content ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
556556
echo '</script>' . "\n";
557557
}
558558
}
@@ -578,10 +578,7 @@ private function execute_php_snippet( $content ) {
578578
if ( is_callable( $func ) ) {
579579
$func();
580580
}
581-
} catch ( \Throwable $e ) {
582-
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
583-
error_log( 'Code Snippet Error: ' . $e->getMessage() );
584-
}
581+
} catch ( \Throwable $e ) {
585582
}
586583

587584
$output = ob_get_clean();

0 commit comments

Comments
 (0)