## WP Db Abstraction[resolved] Fix problems with Backslash Usage (3 posts)

1. mauridb
Member
Posted 1 year ago #

If you try to use Backslash in a post, it will skrew up the query rewriting and as a result your post won't be saved.

In order to fix this I've used this patch that needs to be applied to the \wp-content\mu-plugins\wp-db-abstraction\translations\sqlsrv file at the function "translate":

After the line 208

$this->preg_original =$query = trim($query); insert the following code // Remove backslash in order to avoid problems with rewriting$query = str_replace('\\', '& # 9 2;', $query); and before the line // debug code // file_put_contents[...]; return$query;

insert the following code

$query = str_replace('& # 9 2;', '\\',$query);

Please note that the spaces in the replace string has been added only to prevent this forum to turn the encoded value into the HTML equivalent (the backslash), so you should remove it in your code.

2. runner973@hotmail.com
Member
Posted 10 months ago #

Hi
this is a very usefull fix. With this fix I resolved the problem of pagination on different theme.
Very regards.

3. seefeld
Member
Posted 10 months ago #

Great tip for those of use using WordPress on SQL! Many thanks.

This topic has been closed to new replies.