• Resolved docwhat

    (@docwhat)


    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"]
      javascript:window.open(‘http://someurl/’);
      [/code]`
    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter docwhat

    (@docwhat)

    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;”>
    javascript:window.open(‘http://someurl/’);
    </pre>`

    So something is going wrong during the JS load.

    Thread Starter docwhat

    (@docwhat)

    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.

    Thread Starter docwhat

    (@docwhat)

    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>);
    </span></pre>

    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.

    Plugin Contributor Alex Mills

    (@viper007bond)

    heh, no worries, I didn’t see this thread until after you resolved the issue. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: SyntaxHighlighter Evolved] Code is showing extra , etc.’ is closed to new replies.