I am having a hard time finding the lines of code that control how a front-end review is submitted and saved into the database, but I found where the review is saved once it’s edited by the admin.
There are 2 ways to fix (or at least patch) this problem. One is to change the way the review is saved into the database once it’s edited by the admin, and the other is to change the way the review is outputted.
To change the way the review is saved when the admin modifies it, the code is found in the file wp-customer-reviews-admin.php between lines 822 and 859 (it’s in the function “real_admin_view_reviews” and I’m starting with the “default” section of the switch). Where you see on lines 852 and 858:
$update_val = mysql_real_escape_string($new_value);
and
$update_val = mysql_real_escape_string($val);
you can add “stripslashes()” to remove the slashes from being saved in the database, so these lines would look like:
$update_val = mysql_real_escape_string(stripslashes($new_value));
and
$update_val = mysql_real_escape_string(stripslashes($val));
Alternatively, if you just want to remove the slashes when they get outputted, that code is in the file wp-customer-reviews.php at around line 704, which currently says:
$review->review_text = nl2br($review->review_text);
You can simply add the “stripslashes()” function to that to get the same effect. I added a new line right above 704 to do this, so now the 2 lines say:
$review->review_text = stripslashes($review->review_text);
$review->review_text = nl2br($review->review_text);
This seems to do the job… no more annoying slashes! Hope this helps, and let me know if you find anything else on how this problem can be fixed.