We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9940a5b commit 2415bf8Copy full SHA for 2415bf8
1 file changed
src/wp-includes/css-api/class-wp-css-token-processor.php
@@ -856,6 +856,7 @@ private function create_css_string( string $value ): string {
856
$escaped = strtr(
857
$value,
858
array(
859
+ // Escape existing backslashes to prevent unintentional escapes in result.
860
'\\' => '\\5C ',
861
862
// Pre-processing replaces NULLs and some newlines. Replace and escape as necessary.
@@ -869,6 +870,8 @@ private function create_css_string( string $value ): string {
869
870
// Newlines must be escaped in CSS strings.
871
"\n" => '\\A ',
872
873
+ // Arbitrary characters for Unicode escaping:
874
+
875
// HTML syntax may be problematic.
876
'<' => '\\3C ',
877
'>' => '\\3E ',
0 commit comments