WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
[resolved] Page is broken when post excerpt contain any HTML tag (5 posts)

  1. oneTarek
    Member
    Posted 11 months ago #

    I wrote this same problem few months ago. I also gave a solution. Plugin author updated this issue in the latest version 1.74. But he use wrong function . it is not working. I have my broken page yet.

    Currently it uses following codes in wp-postratings.php
    $post_meta = '<meta itemprop="name" content="'.esc_attr($post_title).'"><meta itemprop="description" content="'.esc_attr($post_excerpt).'">

    ------BUT IT SHOULD BE FOLLOWING------ use wp_kses() instead of esc_attr()----

    $post_meta = '<meta itemprop="name" content="'.esc_attr($post_title).'"><meta itemprop="description" content="'.wp_kses($post_excerpt, array()).'">

    PLEASE UPDATE THIS PLUGIN

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

  2. Lester Chan
    Member
    Plugin Author

    Posted 11 months ago #

    Thank you! https://github.com/lesterchan/wp-postratings/commit/9d3d5ae3588bf90d5efe1033d01c012f2e82e5d6. It will be release in 1.75. I will hold it for a while for more fixes (if there is any)

  3. M Asif Rahman
    Member
    Posted 11 months ago #

    Thanks Tarek for the fix, and Chan for adopting it that fast this time. Really appreciate it.

  4. Erik
    Member
    Posted 11 months ago #

    Ahem... the tags described above is not closed.

    They should either be "<meta ... />" or <meta ...></meta>"

    Just something I couldn't keep from commenting...

  5. Lester Chan
    Member
    Plugin Author

    Posted 11 months ago #

Reply

You must log in to post.

About this Plugin

About this Topic