• Resolved Matt Robinson

    (@mattyrob)


    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 <?php statement 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 filter foundation_social_show_link is passed through esc_html() – that should probably be passed through wp_kses() in order to prevent excessive escaping of valid HTML.

Viewing 5 replies - 1 through 5 (of 5 total)
  • another of my sites auto-updated (gotta turn that off;-) 4.3.48 seems to have fixed the missing css in 4.3.47, but still spewing:

    $allowed_html = shapeSpace_allowed_html(); echo wp_kses($html,$allowed_html); ?>

    appears in the footer instead of social icons:-\

    I am seeing the same issue as airdrummer on versions 4.3.48 and 4.3.47. I’ve rolled back to 4.3.46.

    Thanks!

    Version 4.3.50 fixed this issue for me.

    Plugin Contributor WPtouch

    (@wptouch)

    Hi, this issue has been resolved in the latest release.

    Thanks for using WPTouch!

    Thread Starter Matt Robinson

    (@mattyrob)

    @wptouch

    Thanks for confirming. I had noticed I no longer needed to make my edits. I hope my code snippet helped.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Social Links HTML is excessively escaped’ is closed to new replies.