WordPress.org

Ready to get started?Download WordPress

Forums

Better Related Posts
Breaks when percentage symbol in post content (1 post)

  1. smerriman
    Member
    Posted 1 year ago #

    Was experiencing some problems with some posts not showing any related content at all, so I did some digging, and discovered that when using content matching, and there is a percentage in the content, no results are returned at all.

    This is because the % symbol isn't being escaped to %% before being passed to $wpdb->prepare in score_by_content. In fact, since you're not passing any parameters at all, I don't think you need the prepare statement at all - but if you want to keep it, %s should be escaped.

    If this is fixed, I expect there's no way to update problematic posts is there - unless it can somehow be run on posts with % symbols only?

    http://wordpress.org/extend/plugins/better-related/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.