diff --git a/Puc/v5p6/DebugBar/Panel.php b/Puc/v5p6/DebugBar/Panel.php index 77d2227..acd943c 100644 --- a/Puc/v5p6/DebugBar/Panel.php +++ b/Puc/v5p6/DebugBar/Panel.php @@ -41,11 +41,11 @@ if ( !class_exists(Panel::class, false) && class_exists('Debug_Bar_Panel', false echo '

Configuration

'; echo ''; $this->displayConfigHeader(); - $this->row('Slug', htmlentities($this->updateChecker->slug)); - $this->row('DB option', htmlentities($this->updateChecker->optionName)); + $this->row('Slug', esc_html($this->updateChecker->slug)); + $this->row('DB option', esc_html($this->updateChecker->optionName)); $requestInfoButton = $this->getMetadataButton(); - $this->row('Metadata URL', htmlentities($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $this->responseBox); + $this->row('Metadata URL', esc_html($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $this->responseBox); $scheduler = $this->updateChecker->scheduler; if ( $scheduler->checkPeriod > 0 ) { @@ -115,10 +115,10 @@ if ( !class_exists(Panel::class, false) && class_exists('Debug_Bar_Panel', false $this->row('Next automatic check', $this->formatTimeWithDelta($nextCheck)); if ( $state->getCheckedVersion() !== '' ) { - $this->row('Checked version', htmlentities($state->getCheckedVersion())); + $this->row('Checked version', esc_html($state->getCheckedVersion())); $this->row('Cached update', $state->getUpdate()); } - $this->row('Update checker class', htmlentities(get_class($this->updateChecker))); + $this->row('Update checker class', esc_html(get_class($this->updateChecker))); echo '
'; } @@ -132,7 +132,7 @@ if ( !class_exists(Panel::class, false) && class_exists('Debug_Bar_Panel', false if ( property_exists($update, $field) ) { $this->row( ucwords(str_replace('_', ' ', $field)), - isset($update->$field) ? htmlentities($update->$field) : null + isset($update->$field) ? esc_html($update->$field) : null ); } } @@ -170,7 +170,7 @@ if ( !class_exists(Panel::class, false) && class_exists('Debug_Bar_Panel', false if ( is_object($value) || is_array($value) ) { //This is specifically for debugging, so print_r() is fine. //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r - $value = '
' . htmlentities(print_r($value, true)) . '
'; + $value = '
' . esc_html(print_r($value, true)) . '
'; } else if ($value === null) { $value = 'null'; } diff --git a/Puc/v5p6/DebugBar/PluginPanel.php b/Puc/v5p6/DebugBar/PluginPanel.php index 58f2ee9..04db3d9 100644 --- a/Puc/v5p6/DebugBar/PluginPanel.php +++ b/Puc/v5p6/DebugBar/PluginPanel.php @@ -12,7 +12,7 @@ if ( !class_exists(PluginPanel::class, false) ): protected $updateChecker; protected function displayConfigHeader() { - $this->row('Plugin file', htmlentities($this->updateChecker->pluginFile)); + $this->row('Plugin file', esc_html($this->updateChecker->pluginFile)); parent::displayConfigHeader(); } diff --git a/Puc/v5p6/DebugBar/ThemePanel.php b/Puc/v5p6/DebugBar/ThemePanel.php index 2ffdbf0..8369611 100644 --- a/Puc/v5p6/DebugBar/ThemePanel.php +++ b/Puc/v5p6/DebugBar/ThemePanel.php @@ -13,7 +13,7 @@ if ( !class_exists(ThemePanel::class, false) ): protected $updateChecker; protected function displayConfigHeader() { - $this->row('Theme directory', htmlentities($this->updateChecker->directoryName)); + $this->row('Theme directory', esc_html($this->updateChecker->directoryName)); parent::displayConfigHeader(); } diff --git a/Puc/v5p6/PucFactory.php b/Puc/v5p6/PucFactory.php index 2515f97..b7a5fb9 100644 --- a/Puc/v5p6/PucFactory.php +++ b/Puc/v5p6/PucFactory.php @@ -86,7 +86,7 @@ if ( !class_exists(PucFactory::class, false) ): throw new \RuntimeException(sprintf( 'The update checker cannot determine if "%s" is a plugin or a theme. ' . 'This is a bug. Please contact the PUC developer.', - htmlentities($fullPath) + esc_html($fullPath) )); } @@ -239,7 +239,7 @@ if ( !class_exists(PucFactory::class, false) ): //URI was not found so throw an error. throw new \RuntimeException( - sprintf('Unable to locate URI in header of "%s"', htmlentities($fullPath)) + sprintf('Unable to locate URI in header of "%s"', esc_html($fullPath)) ); } diff --git a/Puc/v5p6/UpdateChecker.php b/Puc/v5p6/UpdateChecker.php index 31b83c9..cff4030 100644 --- a/Puc/v5p6/UpdateChecker.php +++ b/Puc/v5p6/UpdateChecker.php @@ -1044,7 +1044,7 @@ if ( !class_exists(UpdateChecker::class, false) ): sprintf( 'The directory structure of the update was incorrect. All files should be inside ' . 'a directory named %s, not at the root of the ZIP archive. Plugin Update Checker tried to fix the directory structure, but failed.', - htmlentities($this->slug) + esc_html($this->slug) ) ); }