Title: Lost Backslashes
Last modified: May 2, 2019

---

# Lost Backslashes

 *  [Collie-IT, Anne K. Frey](https://wordpress.org/support/users/collieit/)
 * (@collieit)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/lost-backslashes/)
 * Dear Ladies and Gentlemen,
 * i have a litte issue with backslashes and save. I try to enter a regex in a script
   tag on a page, but the Classic-Editor-Plugin removes the char: “\” ( U+005C or&
   bsol;) by saving.
    For exemple $(“#XXX”).val().replace(/(?:\r\n|\r|\n)/g, ‘<br
   >’) will be saved as $(“#XXX”).val().replace(/(?:rn|r|n)/g, ‘<br>’)
 * If you save the changes the count of backslashs will reduced by half in the database.
 * It is reproducible under a XAMPP windows pc and a Ubuntu 19.04 LAMPP setup.
    
   I use WordPress Version 5.1.1 and Plugin classic Editor Version 3.25
 * If you write it manual in a js/css file the backslash count is not toutched.
 * Have you any suggestion to resolve the Issue?
 * Best reagards
    Collie-IT

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

 *  Plugin Author [Andrew Ozz](https://wordpress.org/support/users/azaozz/)
 * (@azaozz)
 * [7 years ago](https://wordpress.org/support/topic/lost-backslashes/#post-11527465)
 * This is not a problem with the Classic Editor plugin itself. It sounds like there
   is a problem with how WP sanitizes and saves posts. I just re-tested backslashes
   in the content in the classic editor (both Visual and Text tabs, and both as 
   admin and author) and it seems to work properly here. Perhaps you re using some
   sort of “code highlighting” plugin or similar?
 *  Thread Starter [Collie-IT, Anne K. Frey](https://wordpress.org/support/users/collieit/)
 * (@collieit)
 * [6 years, 12 months ago](https://wordpress.org/support/topic/lost-backslashes/#post-11638513)
 * Yes I have a Code highlighting plugin installed ([https://de.wordpress.org/plugins/custom-css-js/](https://de.wordpress.org/plugins/custom-css-js/)).
 * I tryed it on a normal page (without custom-css-js) but the issue is still there.
   
   With Gutenberg the problem not appears.

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

The topic ‘Lost Backslashes’ is closed to new replies.

 * ![](https://ps.w.org/classic-editor/assets/icon-256x256.png?rev=1998671)
 * [Classic Editor](https://wordpress.org/plugins/classic-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/classic-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/classic-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/classic-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/classic-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/classic-editor/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Collie-IT, Anne K. Frey](https://wordpress.org/support/users/collieit/)
 * Last activity: [6 years, 12 months ago](https://wordpress.org/support/topic/lost-backslashes/#post-11638513)
 * Status: not resolved