WordPress eating my backslash (\) on <pre> tag
-
I put this on a “pre” tag:
csc /r:”C:Program FilesSQLite.NETbinSystem.Data.SQLite.dll”,System.Data.dll Test.cs
WordPress surprisingly removed all the backslash on the rendered HTML. The solution is to use \ which will be replaced by on the rendered HTML.
Can anyone explain this “feature”?
Thanks
-
Surprised you’re not having to enter three of them.
It’s PHP encoding for MySQL security known as stripslashes. The backslash is a special character in PHP used to tell it how to handle quote marks correctly.
Normally when you see a quote mark within a MySQL command, MySQL understands it to be the end or beginning of a variable. If you put a slash in front of it, MySQL understand sthat you want the quote mark included within that variable. Normally when you specifically want a slash to appear, you put three of them in there. (Hense my surprise.)
Best bet would be to submit a feedback and let staff know what is occuring.
-
This is indeed most irritating. I need the backslash frequently in code fragments and no matter how much I put in, another pass through the editor seems to take them out again. I also tried to use & and within <code> but nothing works. Even a smart trick using &lt will get substituted again when I go back to edit, and from that point it is active HTML code.
I suppose what it would take is to “untranslate” the special codes back before editing.
– Rob
-
-
I could live with that, but when I code that one it gets replaced by a back slash when I edit, and then it’s gone… How do you code the & # 92 ; in your post and keep it there?
-
How do you code the & # 92 ; in your post and keep it there?
Using ASCII for the ampersand and the number sign.
- The topic ‘WordPress eating my backslash (\) on <pre> tag’ is closed to new replies.