WordPress.org

Ready to get started?Download WordPress

Forums

WP SyntaxHighlighter
[resolved] Bug Report: Error in JavaScript imports (4 posts)

  1. thybag
    Member
    Posted 3 years ago #

    Hello,

    The bugs been around for a few versions so I thought I better report it to save myself fixing it each time :)

    Basically on line 415 of wp-syntaxhighlighter.php you have
    echo "<script type=\"text/javascript\" src=\"".$wp_sh_plugin_url.$lib_dir."/scripts/shCore.js?ver=\".$version></script>\n";

    Which is then outputting
    <script type="text/javascript" src="http://website.com/wp-content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js?"ver=3.0></script>

    instead of
    <script type="text/javascript" src="http://website.com/wp-content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js?ver=3.0"></script>
    to the browser which throws up a load of validation errors.

    My version of the fixed line is:
    echo "<script type=\"text/javascript\" src=\"".$wp_sh_plugin_url.$lib_dir."/scripts/shCore.js?ver=".$version."\"></script>\n";

    Hope that helps,
    Carl

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

  2. redcocker
    Member
    Plugin Author

    Posted 3 years ago #

    Hi, Carl san

    Thank you for your report and help.

    The bugs been around for a few versions so I thought I better report it to save myself fixing it each time :)

    Sorry to inconvenience you.

    I fixed this issue and released ver.1.3.8.2.

  3. @wikicms
    Member
    Posted 3 years ago #

    Hi, redcocker
    I find another missing element.. on line 311
    wp_enqueue_style('core-default'.$version, $wp_sh_plugin_url.$lib_dir.'styles/shCoreDefault.css', false, $version);

    I think You missing slash /
    wp_enqueue_style('core-default'.$version, $wp_sh_plugin_url.$lib_dir.'/styles/shCoreDefault.css', false, $version);
    ===
    Is that all? :)

  4. redcocker
    Member
    Plugin Author

    Posted 3 years ago #

    Hi, minimarket san

    Thank you for your report and help.

    As Fortunately, this issue doesn't seem to cause a problem,
    I will fix this issue in next version with other changes.

    After WordPress 3.2 Japanse is released, I will release WP SyntaxHighlighter ver.1.4.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic