Styles CSS is wrongly HTML encoded
-
Hi,
I’m using Formidable Forms 6.9 with WordPress 6.5.2 and PHP 8.
One thing I’ve noticed is that I get some CSS errors in the file formidableforms.css with font-family names that need to be quoted.
I get this for example:
.ss-content.frm_slimselect { font-size: 14px; font-family:" Lucida Grande" ," Lucida Sans Unicode" ,Tahoma,sans-serif; height: auto; display: flex; }
.ss-content.frm_slimselect { font-size: <?php echo esc_html( $defaults['field_font_size'] ); ?>; <?php if ( '' !== $defaults['font'] ) : ?> font-family:<?php echo esc_html( $defaults['font'] ); ?>; <?php endif; ?> /* These rules fix conflicts with Boostrap 3 */ height: auto; display: flex; }
When I look at the source code for pro_fields.css.php I can see that the esc_html() function is being used. This creates the character entities. Since the output is CSS, not HTML, this seems to me the wrong way to try and sanitize the output.
I can hack a solution myself to this, but it looks like it needs fixing.
Thanks
Max
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Styles CSS is wrongly HTML encoded’ is closed to new replies.