Title: Backslashes disappearing
Last modified: February 23, 2020

---

# Backslashes disappearing

 *  Resolved [asherber](https://wordpress.org/support/users/asherber/)
 * (@asherber)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/backslashes-disappearing/)
 * Plugin does just what I want, except for one issue it took me a while to find.
 * I’m adding JS to a particular page. The code includes a regex valdation, like/\
   d{1,3}/.test(value). When I save the page, the backslashes are removed and don’t
   show up when the page is rendered on my website. Obviously, this changes the 
   regex.
 * I tried using two backslashes. This got everything to work, since only one of
   the two got removed on save. But when I edited the page again, my code only showed
   a single backslash, and when I saved the page, that one got removed as well.
 * I was able to work around this by using [0-9] instead of \d, but it would be 
   nice to see this addressed.

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

 *  Plugin Author [Aleksandar Urošević](https://wordpress.org/support/users/urkekg/)
 * (@urkekg)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/backslashes-disappearing/#post-12493829)
 * Hello [@asherber](https://wordpress.org/support/users/asherber/),
 * Thank you for reporting this bug. New release 1.1.0 has fixed that bug and introduced
   new hook `wp_body_open` which allow inserting of code after the opening `<BODY
   >` tag (active theme has to support this new hook introduced in WordPress 5.2
   and our FAQ provide instructions on how to do that on any theme).
 * Please let me know if 1.1.0 resolve problem on your site.
 * Kind regards,
    Aleksandar
 *  Thread Starter [asherber](https://wordpress.org/support/users/asherber/)
 * (@asherber)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/backslashes-disappearing/#post-12494378)
 * Thanks very much! I can confirm that this is working for me now.

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

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

 * ![](https://ps.w.org/head-footer-code/assets/icon.svg?rev=3299702)
 * [Head & Footer Code](https://wordpress.org/plugins/head-footer-code/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/head-footer-code/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/head-footer-code/)
 * [Active Topics](https://wordpress.org/support/plugin/head-footer-code/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/head-footer-code/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/head-footer-code/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [asherber](https://wordpress.org/support/users/asherber/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/backslashes-disappearing/#post-12494378)
 * Status: resolved