Title: &#8220;Bad, bad client code&#8221;
Last modified: August 19, 2016

---

# “Bad, bad client code”

 *  [David Radovanovic](https://wordpress.org/support/users/dpaule/)
 * (@dpaule)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/bad-bad-client-code/)
 * I have a client that has written some bad coding using Word. So, I’ve tried a
   search and replace through phpMyAdmin using both:
 * `UPDATE wp_posts SET post_content = " where post_content like '<font%'"`
    and`
   UPDATE wp_posts SET post_content = REPLACE (post_content,'<font%','');`
 * and no luck. MySQL doesn’t find the instances of the bad <font tags and needless
   to say I can’t delete them.
 * Any mysql help would be much appreciated.
 * Thanks!!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [figaro](https://wordpress.org/support/users/figaro/)
 * (@figaro)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/bad-bad-client-code/#post-958112)
 * > I have a client that has written some bad coding using Word.
 * Is there such a thing as “good” code written using Word? 🙂
 * You may have better luck if you dump the database and open it with a text editor.
   Then you can look around and see what the code looks like and do some search/
   replace to clean it up. Once you have it clean, then drop your tables and import
   the sql file back into the database. Just be sure to keep an original copy of
   the dump in the event things don’t turn out well…that way at least you’ll be 
   able to recover to what you have now.
 *  Thread Starter [David Radovanovic](https://wordpress.org/support/users/dpaule/)
 * (@dpaule)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/bad-bad-client-code/#post-958119)
 * Figaro, Thanks for your reply.
 * I’ve tried that… several times. Unfortunately the result is always a broken field
   her or there, leaving me with mush. I’ve tried comma-delimited, tab delimited
   and even pipe delimited and no good. The least cumbersome way is SQL command 
   with wildcard.
 *  [figaro](https://wordpress.org/support/users/figaro/)
 * (@figaro)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/bad-bad-client-code/#post-958122)
 * Well, if he/she copied and pasted Word stuff into posts and pages, then that’s
   almost impossible to clean-up directly in the db. Some rich text editors have
   the Word cleaning icon that seems to do a pretty good job. There is probably 
   a way to add that to the WP editor, but I haven’t tried it. If you do that, maybe
   you could open the posts and clean them that way…tedious, but…
 *  Thread Starter [David Radovanovic](https://wordpress.org/support/users/dpaule/)
 * (@dpaule)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/bad-bad-client-code/#post-958128)
 * Thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘“Bad, bad client code”’ is closed to new replies.

## Tags

 * [clean code](https://wordpress.org/support/topic-tag/clean-code/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [word](https://wordpress.org/support/topic-tag/word/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [David Radovanovic](https://wordpress.org/support/users/dpaule/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/bad-bad-client-code/#post-958128)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
