CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very usefull when you're sending emails.
BSD 3-Clause "New" or "Revised" License
5.8k
stars
187
forks
source link
`mb_encode_numericentity` vs `htmlspecialchars_decode(htmlentities($html))` #246
Hi there! This is actually not an issue with your library (which is amazing!), rather a question. Feel free to close this if you don't have the time right now :)
I'm in the process of migrating a few projects to PHP 8.2 and trying to find the correct replacement for this:
While searching my code base, I found an old version of CssToInlineStyles that was also using this function. And I see that you have replaced it with this since then:
This looks very cryptic to me and I'd like to understand better what's going on here. In my (manual) tests, the following worked with all strings that I tested it with:
htmlspecialchars_decode(htmlentities($html));
But I'm a bit afraid that I'm missing something...
I'd be grateful for any insight you might have on the matter 🙂
Hi there! This is actually not an issue with your library (which is amazing!), rather a question. Feel free to close this if you don't have the time right now :)
I'm in the process of migrating a few projects to PHP 8.2 and trying to find the correct replacement for this:
While searching my code base, I found an old version of CssToInlineStyles that was also using this function. And I see that you have replaced it with this since then:
https://github.com/tijsverkoyen/CssToInlineStyles/blob/83ee6f38df0a63106a9e4536e3060458b74ccedb/src/CssToInlineStyles.php#L116C29-L116C52
This looks very cryptic to me and I'd like to understand better what's going on here. In my (manual) tests, the following worked with all strings that I tested it with:
But I'm a bit afraid that I'm missing something...
I'd be grateful for any insight you might have on the matter 🙂