Social Links HTML is excessively escaped
-
Hi, and thanks for WPTouch.
Since the last update with security hardening I’ve noticed that social links is output to browsers incorrectly due to some excessive escaping and some malformed PHP. The issues are all in the file at./themes/foundation/modules/social-links/social-links.php.Firstly in the
foundation_show_social_links_area()function you have PHP code but no opening<?phpstatement as follows:if ( ! empty( $html ) ) : ?> <ul class="social-links-wrap"> $allowed_html = shapeSpace_allowed_html(); echo wp_kses($html,$allowed_html); ?> </ul> <?php endif;This needs to be updated as follows:
if ( ! empty( $html ) ) : ?> <ul class="social-links-wrap"> <?php $allowed_html = shapeSpace_allowed_html(); echo wp_kses($html,$allowed_html); ?> </ul> <?php endif;The second issue is in the
foundation_social_show_one_link()function where the filterfoundation_social_show_linkis passed throughesc_html()– that should probably be passed throughwp_kses()in order to prevent excessive escaping of valid HTML.
The topic ‘Social Links HTML is excessively escaped’ is closed to new replies.