Styles CSS is wrongly HTML encoded

[ad_1]

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

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer