better-search-replace icon indicating copy to clipboard operation
better-search-replace copied to clipboard

Escaping Issues

Open thowar2 opened this issue 10 years ago • 6 comments

The latest commit works to an extent. If I add \ to escape, it executes the query properly, however the escape does not persist with the rest of the query string when the page reloads.

Additionally, running a query with / in it, such as a full URL, causes the plugin to 404.

thowar2 avatar Feb 12 '15 08:02 thowar2

@thowar2 Thanks for testing this out. I'm not able to replicate the issue with the / in it on either the current release or what's on dev, but I do think that this needs to be tweaked further. What kind of server were you testing on (and PHP version if possible?)

mattgrshaw avatar Feb 12 '15 19:02 mattgrshaw

On ASmallOrange.com hosting: Apache Version 2.2.29 PHP Version 5.4.35 MySQL Version 5.5.41-MariaDB Architecture x86_64 Operating System linux

WP 4.1 Enfold Theme 3.0.8

Cant replicate it on my dev site. As far as I can tell the main difference is that the production site has SSL.

When the error happens, the URL is /wp-admin/admin-post.php and my theme's 404 template is displayed, as if it were a front end page. It only works correctly when the /s are escaped.

thowar2 avatar Feb 13 '15 05:02 thowar2

Thanks for the info. Looking into this further and will keep you posted.

mattgrshaw avatar Feb 13 '15 19:02 mattgrshaw

Hi,

I've released a fix which should fix the issues you were having. I tested on several environments and was able to run a search replace on URLs with \ and / without any issues. Feel free to reopen this if you run into further issues. Thanks!

mattgrshaw avatar Feb 16 '15 20:02 mattgrshaw

Hmm, still having the 404 issue if the URL is not escaped.

However the escapes now persist after the test run.

thowar2 avatar Feb 17 '15 03:02 thowar2

@thowar2 @mattgrshaw Can we use your extension on wp 4.2.2 or bug exits. I have current using options tree plugin and this saved data on serialize so this plugin working correct for replace this kind of data.

rvpatel avatar Mar 30 '16 05:03 rvpatel