- Issue created by @hudri
- @hudri opened merge request.
- Status changed to Fixed
over 1 year ago 11:53am 12 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.
Escaping symbols in CSS class names works with a leading backslash and a hex number (followed by a space if the symbol escaped to a hex number is followed 0-9A-F). This module's middleware mis-interpreted those escaped CSS class names as regex placeholders in some cases.
Create a class name with a colon in it, e.g. a TailwindCSS class name with an arbitrary value:
<div class="[transform:rotate(-90deg)_translate(50px,0px)]">test</div>
Tailwind's output escapes the class name to
.\[transform\:rotate\(-90deg\)_translate\(50px\2c 0px\)\] {
transform: rotate(-90deg) translate(50px,0px);
}
The \2
part of the encoded colon \2c
was interpreted as regex placeholder and removed.
Use str_ireplace instead of preg_replace to inject the compiled CSS at the end of the HTML </head>
Fixed
1.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.