WordPress.org

Ready to get started?Download WordPress

Forums

SyntaxHighlighter Evolved
Code gets comment out after publishing post (5 posts)

  1. wpmhweb
    Member
    Posted 1 year ago #

    Hello,

    I am using SyntaxHighlighter Evolved and when I paste PHP, HTML or any other code after saving or publishing the post, the code gets comment out. For example:

    [php]
    <?php if(!is_user_logged_in()) { ?>
          ***Your Code Here***
    <?php } ?>
    [/php]

    Gets transformed into this:

    [php]<!--?php if(!is_user_logged_in()) { ?-->
          ***Your Code Here***
    <!--?php } ?-->[/php]

    At first I thought it was the TinyMCE Advanced plugin, but after disabling it I still getting the same behavior.

    There is anything I can do to fix this?

    Thanks

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

  2. Alex Mills (Viper007Bond)
    Moderator
    Plugin Author

    Posted 1 year ago #

    Try disabling all other plugins and maybe even switching to the default theme. This seems like some type of "security" feature that a plugin or maybe your host is doing. I can't think of anything in WordPress core or my plugin that would do this.

  3. wpmhweb
    Member
    Posted 1 year ago #

    Hello,

    Thank you for the answer, I am checking right now, but I also would like to point out that I did noticed it only happens when I switch the editor to Text, I save the post and then I switch back to the Visual editor.

    Thanks,

  4. wpmhweb
    Member
    Posted 1 year ago #

    I just disabled all the plugins and I still having the same results. The only thing different I noticed was that after disabling all the plugins and refreshing the post the code in the "Text" editor transform the "<" to HTML character entities (like in the tweet I sent you).

    Sadly if I copy and paste the code here, WordPress will rewrite it as well. I hope you can get the idea. I also sent you a tweet with a screenshot that shows how the code looks

    Should I have to be using the symbols instead?
    Thanks,

  5. wpmhweb
    Member
    Posted 1 year ago #

    I also tried the twenty-twelve theme and I still getting the same problem.

    Thanks,

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic