Quotes in database escaped after malware cleansing
I have a Wordpress-based blog. There was a malware attack on the site, which totally locked a table and made the site inaccessible. After the hosting company cleaned it up, all the images (and other stuff, except for text) in my posts stopped displaying.
Upon investigation, I found that all the quotation marks "
had been escaped, that开发者_Python百科 is they had turned into \"
. Here's a sample code from a Wordpress post:
<img title=\"Wendy's Chicken club - Fast food: ads vs reality\"
height=\"344\" alt=\"Wendy's Chicken club\"
src=\"http://www.sawantshah.com/wp-content/uploads/2009/04/image-thumb.png\"
width=\"640\" border=\"0\" />
Now, how shall I turn these escaped quotes back to normal through SQL? Will a simple find and replace work for escape sequences?
Blog where the problem is occurring, for reference: www.sawantshah.com.
Before you actually do so, make sure your host has competently disabled the malware. Based on your post's question, they've replaced all "
with \"
, which might disable the malware until you revert \"
back to "
-- i.e. not necessarily what you want. Complain to your host and ask them "what gives?!?"/tell them they introduced a new problem before moving a step further.
update my_table set my_column = replace(my_column, '\\"', '"');
精彩评论