Title: WordPress messes up CSS class names
Last modified: August 20, 2016

---

# WordPress messes up CSS class names

 *  Resolved [barq](https://wordpress.org/support/users/barq/)
 * (@barq)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/)
 * Hi,
 * I’m having problems with WordPress rewriting certain CSS class names on WordPress
   pages when uploading the pages to my webhost. The pages work just fine locally
   on my machine running Mamp 1.9.6.
 * For instance:
 * `<h2 class="type">`
 * becomes
    `<h2 class="\"type\"">`
 * When uploaded to my web-host.I’ve been writing the code in the HTML editor. Any
   idea why this happens?
 * See this page for instance:
    [blog.barq.dk/services](http://blog.barq.dk/services)
 * This also happened with WordPress 3.0, but still happens after upgrading to WP
   3.0.

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209015)
 * That sounds like a server issue – specifically to do with mysql_escape… sorry…
   mind’s gone blank. Can’t recall the exact PHP module name but contact your hosts
   and ask them to look into it for you.
 *  Thread Starter [barq](https://wordpress.org/support/users/barq/)
 * (@barq)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209068)
 * Thanks a lot for your reply esmi! I told my webhost. Unfortunately, they don’t
   seem to now what exactly mysql_escape is and how to fix it. They turned off Magic
   Quotes, but it didn’t make any difference.
 * Any ideas on what exact PHP module it is, or what else to do?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209074)
 * Magic Quotes! That’s it! Ask them if they’ve turned off magic_quotes_gpc, magic_quotes_runtime
   and magic_quotes_sybase.
 * (The mysql_escape came from a php function that’s supposed to check to for magic
   quotes).
 *  Thread Starter [barq](https://wordpress.org/support/users/barq/)
 * (@barq)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209229)
 * Thanks! It still hasn’t fixed the problem. Is there anything I can do to manually
   fix the problem?
 *  Thread Starter [barq](https://wordpress.org/support/users/barq/)
 * (@barq)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209232)
 * To followup, I just tested my localhost (where the code works perfectly) and 
   there Magic Quotes ARE enabled. So magic quotes aren’t the problem.
 * Anybody has any idea on what else could be causing these “\problems?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209241)
 * Can you check the content of a sample post in your local database and in your
   remote server? It might help to pinpoint where the slashes are being added – 
   at the input stage or when the content is displayed.
 * Also try:
 * – deactivating **all** plugins to see if this resolves the problem. If this works,
   re-activate the plugins one by one until you find the problematic plugin(s).
 * – switching to the Twenty Eleven theme to rule out any theme-specific problems.
 *  Thread Starter [barq](https://wordpress.org/support/users/barq/)
 * (@barq)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209251)
 * Hi Esmi,
 * Thanks a lot for your kind help. After following your tips I found out that it
   was SEO Smartlinks that added the slashes. Disabling it fixed the problem!
 * Thanks again for your help!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209255)
 * No problem 🙂

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

The topic ‘WordPress messes up CSS class names’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/wordpress-messes-up-css-class-names/#post-2209255)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
