Skip to content

Commit

Permalink
fix(donor): do not show encoded UTF character in donor comment
Browse files Browse the repository at this point in the history
fixes #3631
  • Loading branch information
ravinderk committed Aug 24, 2018
1 parent 2b6a549 commit 0d18997
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions templates/shortcode-donor-wall.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,21 @@
?>
<div class="give-donor__content">
<?php
$comment_content = apply_filters( 'the_content', $comment->comment_content );

if ( $atts['comment_length'] < strlen( $comment->comment_content ) ) {
echo sprintf(
'<p class="give-donor__comment_excerpt">%s&hellip;<span>&nbsp;<a class="give-donor__read-more">%s</a></span></p>',
substr( $comment->comment_content, 0, $atts['comment_length'] ),
substr( $comment_content, 0, $atts['comment_length'] ),
$atts['readmore_text']
);

echo sprintf(
'<div class="give-donor__comment" style="display: none">%s</div>',
apply_filters( 'the_content', $comment->comment_content )
$comment_content
);
} else {
echo apply_filters( 'the_content', $comment->comment_content );
echo $comment_content;
}
?>
</div>
Expand Down

0 comments on commit 0d18997

Please sign in to comment.