2

The title explains my problem. Upon saving CSS stylesheet in the "Appearance > Editor", single backslashes are being stripped out of the stylesheet.

For example:

content="\foo"

becomes:

content="foo"

I cannot find any solution to this on the web. Is there a way around this?

  • Strange, doesn't happen for me in WP 4.2.2. Plugin perhaps?? – bonger Jul 15 '15 at 7:45
  • This very well could be.....I've started testing that this could be a plugin issue, but haven't gotten too much into it yet. Thanks for the feedback.... – Rob Myrick Jul 17 '15 at 22:06
1

Add a second backslash e.g.

content="\\foo"
| improve this answer | |
  • 1
    Could you please explain why you think this could solve the problem? – s_ha_dum Dec 25 '15 at 2:14
  • @s_ha_dum Makes sense to me. \ is an escape character, so to actually print out a single escape character, you need to escape it. Confusing, huh? So \\ will come out as \ after WP parses it. – 38365 Feb 6 '16 at 21:16
  • Many people who come here know next to nothing about the software or about programming in general. Answers should therefore include a reasonable explanation. – s_ha_dum Feb 6 '16 at 21:33
  • This fixed my problem. The WP Theme was developed by some random folks who did strip the CSS content within their Custom CSS editor. Adding two backslashes did fix it. Thanks. – newpxsn Nov 27 '17 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.