Hi,
thanks for your post, and sorry for the trouble.
Could you clarify which modifications you made to the files? Thanks!
It might be necessary to also allow the semicolon ;, as a & in a URL usually gets encoded as &.
Regards,
Tobias
Hello, no trouble at all. Thank you for the help!
I edited the file tablepress-shortcode-filter-get-parameter.php
$filter_term = preg_replace( ‘#[^a-z0-9 &;]#i’, ”, $filter_term );
I then tested the get parameter URL with parameters like
https://example.net/test/?table_filter=1&&b
https://example.net/test/?table_filter=1&&b
It appears that only the string before the symbols are accepted, and the && and anything following is completely disregarded.
Thank you!
Hi,
ah, now I see what’s happening. The problem here is that the & character in a URL has a special meaning. It’s the separator between multiple query variables in the URL.
We might therefore have to “url encode” it, so that it’s not recognized as a & in the URL.
For that, please try again with
https://example.net/test/?table_filter=1%26%26b
This might mean that you have to allow the % as well, and it might be necessary to add a line like
$filter_term = urldecode( $filter_term );
after that preg_replace line.
Regards,
Tobias
I have tested the solution. It works as expected, thank you! You are the best!
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!