• Resolved mauridb

    (@mauridb)


    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

    // Add backslash again
    $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.

    http://wordpress.org/extend/plugins/wordpress-database-abstraction/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Db Abstraction] Fix problems with Backslash Usage’ is closed to new replies.