• Resolved Saruspete

    (@saruspete)


    Hi,

    When using 2 or more blockquote, and with the setting “counting_exclude_quotations” enabled, the counting of words is incorrect.

    This is due to the “greedy” regex in ppc_counting_stuff.php::count_post_words while it should be “ungreedy”

    In the function

    preg_replace( ‘/<(blockquote|q)>.*<\/(blockquote|q)>/s’, ”, $post->post_content );

    the “.*” should be “.*?

    Regards
    Adrien.

    https://wordpress.org/plugins/post-pay-counter/

Viewing 1 replies (of 1 total)
  • Plugin Author Stefano

    (@ste_95)

    Thanks for reporting, and yes, that was the solution. It’s great when other developers contribute!

    Version 2.35 fixes the issue.
    Have a nice day,
    Stefano

Viewing 1 replies (of 1 total)
  • The topic ‘[Bug] Bad wordcount with 2 blockquotes’ is closed to new replies.