diff --git a/core/lib/Drupal/Component/Utility/SafeMarkup.php b/core/lib/Drupal/Component/Utility/SafeMarkup.php index 7ad3aa4..c0b8c22 100644 --- a/core/lib/Drupal/Component/Utility/SafeMarkup.php +++ b/core/lib/Drupal/Component/Utility/SafeMarkup.php @@ -186,10 +186,9 @@ public static function checkPlain($text) { * @code * text output here. * @endcode - * - ':variable': URL placeholder, escaped to HTML but also stripped of bad - * protocols like "javascript:". This is the only placeholder that is - * secure when placing a URL into an HTML attribute (such as "src" or - * "href"). + * - ':variable': HTML is escaped and bad protocols like "javascript:" are + * stripped. This is the only placeholder that is secure when placing a + * URL into a HTML attribute (such as "src" or "href"). * - !variable: Inserted as is, with no sanitization or formatting. Only * use this when the resulting string is being generated for one of: * - Non-HTML usage, such as a plain-text email. diff --git a/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php b/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php index 4488e2b..14ca6cf 100644 --- a/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php +++ b/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php @@ -49,6 +49,8 @@ public function __sleep() { * {@inheritdoc} */ public function __wakeup() { + // In PHPUnit tests we might want to use objects like \Drupal\Core\Url in + // data providers, which are executed before any setup code. if (!\Drupal::hasContainer()) { return; } diff --git a/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php b/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php index 8cdfbc9..29adbfb 100644 --- a/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php +++ b/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php @@ -14,7 +14,7 @@ use Drupal\KernelTests\KernelTestBase; /** - * Providers an integration test coverage for SafeMarkup with other systems. + * Provides a test covering integration of SafeMarkup with other systems. * * @group Utility */