• Resolved extraordinarythemes

    (@extraordinarythemes)


    Hi.
    I have a search box in the home page and a table with Shortcode Filter from GET parameter in another page.
    The search works fine, except when the searh values has “-“, like in “6SL3352-1AG37-4FA1” it doesn’t show anything in the search results.
    In the searchbox on the top of the table it accepts the “-” with no problem, only in the search comming from the get parameter it doesn’t work.
    How can I fix it?

    Best regards,
    Adam

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    This is caused by the input sanitization of the Shortcode Filter from GET parameter Extension. It’s indeed removing - from the search terms. To change that, please change line 23 of the tablepress-shortcode-filter-get-parameter.php file from
    $filter_term = preg_replace( '#[^a-z0-9 ]#i', '', $filter_term );
    to
    $filter_term = preg_replace( '#[^a-z0-9 -]#i', '', $filter_term );
    Regards,
    Tobias

    Thread Starter extraordinarythemes

    (@extraordinarythemes)

    Thanks Tobias.
    Now it is working!

    Best regards,
    Adam

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with “-” in the Shortcode Filter from GET parameter’ is closed to new replies.