• Resolved akh1215

    (@akh1215)


    Hi Tobias,

    I have a table showing on our home page with all table values displaying correctly. On other pages, I filter the same table using your filter plugin. Everything works well except when I filter on names that have apostrophes in them, then the table shows blank. For example, this table should display 2 rows for the filter “Wendy’s” but it does not display anything.

    https://franchisedisclosuredocuments.net/search-fdds/wendys-fdd/

    On the home page, the 2 rows for Wendy’s display properly when I use the search box. Any thoughts on how I can get the filter to work correctly?

    Thank you for your plugins!!

    https://wordpress.org/plugins/tablepress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Which filtering are you referring to here? The Row Filter Extension?
    What’s the exact Shortcode that you are using?
    Can I see the full table somewhere?

    Regards,
    Tobias

    Thread Starter akh1215

    (@akh1215)

    Thank you for your quick response!

    Yes, I am using the row filtering extension.

    The shortcode used on the page is [table id=28 filter=keyword table_head=false filter=”Wendy’s” /]</p>
    The page is https://franchisedisclosuredocuments.net/search-fdds/wendys-fdd/
    I would like this the table on this page to just show the table rows that include “wendy’s”.
    The shortcode filter works perfectly on all pages/tables except those rows that have apostrophes.

    The home page where the entire table is displayed is https://franchisedisclosuredocuments.net/
    I can search on “Wendy’s” in this table and it displays fine.

    Thanks!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for that information! Indeed, there’s a small bug in the Extension that prevents filtering for terms that contains '. The reason is that it is escaped, although that is not necessary.

    To fix this, please change line 150 of the tablepress-row-filter.php file from

    $filter_terms[ $key ] = addslashes( wp_specialchars_decode( $filter_term, ENT_QUOTES, false, true ) );

    to

    $filter_terms[ $key ] = wp_specialchars_decode( $filter_term, ENT_QUOTES, false, true );

    Regards,
    Tobias

    Thread Starter akh1215

    (@akh1215)

    Thank you very much Tobias! That fixed our problem and things all work well now.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!
    Thanks for the confirmation.

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Filtering with an apostrophe’ is closed to new replies.