Skip to content

Commit

Permalink
Yet another attempt to fix #38
Browse files Browse the repository at this point in the history
  • Loading branch information
cabrerahector committed Sep 18, 2014
1 parent 1324867 commit b8a14ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions wordpress-popular-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ private function __render_popular_post($p, $instance) {
'comments' => $comments
);

$content = htmlspecialchars_decode($this->__format_content($instance['markup']['post-html'], $data, $instance['rating']), ENT_QUOTES) . "\n";
$content = $this->__format_content($instance['markup']['post-html'], $data, $instance['rating']) . "\n";

}
// build regular layout
Expand Down Expand Up @@ -2666,8 +2666,6 @@ private function __format_content($string, $data = array(), $rating) {
if (empty($string) || (empty($data) || !is_array($data)))
return false;

$string = htmlentities( $string );

$params = array();
$pattern = '/\{(excerpt|summary|stats|title|image|thumb|rating|score|url|text_title|author|category|views|comments)\}/i';
preg_match_all($pattern, $string, $matches);
Expand Down Expand Up @@ -2735,7 +2733,7 @@ private function __format_content($string, $data = array(), $rating) {
$string = str_replace( "{comments}", $data['comments'], $string );
}

return html_entity_decode( $string, ENT_QUOTES, $this->charset );
return $string;

} // end __format_content

Expand Down

0 comments on commit b8a14ca

Please sign in to comment.