WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
No escape quotes (2 posts)

  1. felipedjinn
    Member
    Posted 11 months ago #

    Hi, my excerpt contains quotes so in meta itemprop=description brokes =/

    I resolve this adding esc_attr() to post attributes used in google rich snippets, line 1245:
    $post_meta = '<meta itemprop="name" content="'.esc_attr($post_title).'"><meta itemprop="description" content="'.esc_attr($post_excerpt).'"><meta itemprop="url" content="'.esc_attr($post_link).'">';

    and remove function htmlspecialchars_decode in line 1259:
    return apply_filters('expand_ratings_template', $value);

    You could also add a strip_tags to =)
    tks

    http://wordpress.org/extend/plugins/wp-postratings/

  2. Lester Chan
    Member
    Plugin Author

    Posted 11 months ago #

    Thanks! Added esc_attr(), I will leave htmlspecialchars_decode() there https://github.com/lesterchan/wp-postratings/commit/4dc60bdc7b31691ee70a29d551053025248546b8

Reply

You must log in to post.

About this Plugin

About this Topic