WordPress.org

Support

Support » Plugins and Hacks » SyntaxHighlighter Evolved » [Resolved] backslash stripped from [bash] regex? :(

[Resolved] backslash stripped from [bash] regex? :(

  • Hello, I can’t seem to find help with this.

    I am trying to write a regex and display it on my blog but i noticed backslashes being stripped from my regex using [bash] or [shell]

    Example would be “\.\.|\.exe” – strips all backslashes

    When I attempt to use the HTML entity, it obviously doesn’t translate.

    \.\.|\.exe edit: oh wow & # 9 2 ; translates to a backslash even if i use code, lol. -_-

    Is there shortcode i can use to insert the backslash entity and have it display?

    🙂 Thank you.

    http://wordpress.org/extend/plugins/syntaxhighlighter/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Alex Mills (Viper007Bond)

    @viper007bond

    The problem is WordPress passes slashed POST data through the filters I use. I have to strip the slashes, do the content modification, and then add the slashes back.

    Your slashes are being caught in the crossfire and being removed. 🙁

    I can’t think of a good solution, other than perhaps double-backslashes.

    You can read more on the insanity here: http://core.trac.wordpress.org/ticket/21767

    I have the same problem with backslashes and square bracket when trying to color some bash command.

    For example [bash]PS1=”\[\e[1;31m\]cnodev\[\e[0m\]@\h:\w\$ “[/bash]
    is not displayed properly…

    In my case even using the html code for the square bracket doesn’t help.
    How can I type such code in my blog?

    Thanks for the help, and thanks Alex for this nice plugin!

    Until they fix core and how they handle slashes I am just using pastebin Embed. :/

    Hi chaos can you be a bit more precise?
    What is pastebin embed? I really would like to
    post some bash commanda and I am stuck!

    Thanks for the help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] backslash stripped from [bash] regex? :(’ is closed to new replies.
Skip to toolbar