From 0e723ecea988586a356fdbb2bc3a6103b7cd8f86 Mon Sep 17 00:00:00 2001 From: Joost de Valk Date: Thu, 16 May 2024 13:39:02 +0200 Subject: [PATCH] Fix CS --- src/class-admin-page.php | 2 +- src/class-rest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class-admin-page.php b/src/class-admin-page.php index 7a14734..9689286 100644 --- a/src/class-admin-page.php +++ b/src/class-admin-page.php @@ -435,7 +435,7 @@ private function get_value_button( string $name, $value ): string { ' . // translators: %s is the name of the option. '

' . sprintf( esc_html__( 'Value of %s', 'aaa-option-optimizer' ), '' . esc_html( $name ) . '' ) . '

-
' . htmlentities( $string ) . '
+
' . htmlentities( $string, ENT_QUOTES | ENT_SUBSTITUTE ) . '
'; } diff --git a/src/class-rest.php b/src/class-rest.php index a428f32..8bde134 100644 --- a/src/class-rest.php +++ b/src/class-rest.php @@ -148,7 +148,7 @@ public function get_all_options() { $output[] = [ 'name' => $option->option_name, 'plugin' => $this->map_plugin_to_options->get_plugin_name( $option->option_name ), - 'value' => htmlentities( $option->option_value ), + 'value' => htmlentities( $option->option_value, ENT_QUOTES | ENT_SUBSTITUTE ), 'size' => number_format( strlen( $option->option_value ) / 1024, 2 ), 'autoload' => $option->autoload, 'row_id' => 'option_' . $option->option_name,