Facebook widgets interfere with widget titles by escaping HTML
-
The facebook widgets included in this plugin are escaping the widget title. This is incorrect because this interferes with any
widget_title
hooks that one might have, which might be inserting HTML tags. One common way this is used is to change the widget title to a hyperlink and in such a case, the facebook widget is converts the link tag’s<
to& lt;
and>
to& gt;
respectively which ends up displaying the full HTML on the page instead of interpreting as a link.The problematic line is in the
widget()
function:if ( $title ) echo $before_title . esc_html( $title ) . $after_title;
should be changed to:
if ( $title ) echo $before_title . $title . $after_title;
This can be found in all the files which are implementing widgets such as
social-plugins/widgets/like-box.php
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Facebook widgets interfere with widget titles by escaping HTML’ is closed to new replies.