SyntaxHighlighter Evolved
[resolved] Code is showing extra , etc. (5 posts)

  1. docwhat
    Posted 4 years ago #

    I reproduced this after removing all plugins except SyntaxHighlighter Evolved version 2.3.8. I'm only using the HTML editor, not the Visual one.

    To reproduce:

    1. Goto a post that is published.
    2. Added a block like `[code lang="js"]
    3. Click update
    4. View the post. Notice it is correctly formatted.
    5. Edit the post again -- making a random change outside the [code] block.
    6. Click preview.
    7. Notice that the Syntaxhighlighted section is wrapped in <span> and the link is wrapped in <a>.
    8. View the post. Notice it is still correctly formatted.
    9. Click update.
    10. View the post. Notice it is now messed up like the preview was.

    Sometimes, it'll start working again, but I'm not sure what triggers it. It's very annoying.

  2. docwhat
    Posted 4 years ago #

    Additional data. You can see that the PHP is actually doing the right thing by moving the syntaxhighlighter subdirectory to a different name (to prevent the JS from loading)....

    You get `<pre class="brush: jscript;">

    So something is going wrong during the JS load.

  3. docwhat
    Posted 4 years ago #

    I went through and disable all JS running by moving /wp-includes/js to js- and doing the same thing for the JS needed by my theme.

    That didn't fix it. So it must be in SyntaxHighlighter's JS itself.

  4. docwhat
    Posted 4 years ago #

    Ah-hah....I've narrowed the adding of the <span> and <a> tags to shCore.js itself by disabling all the brushes.

    <pre class="brush: jscript;"><span>alert('narf');
    javascript:window.open(‘<a href="http://someurl/’" muse_scanned="true">http://someurl/’</a>);

    Whups. Okay, figured it out after tracing through lots of JavaScript. It's a Chrome Extension called "Chrome Link Checker" which is doing this. Never mind. *sigh* Sorry to waste your time.

  5. Alex Mills (Viper007Bond)
    Plugin Author

    Posted 4 years ago #

    heh, no worries, I didn't see this thread until after you resolved the issue. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SyntaxHighlighter Evolved
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic