Support » Plugin: SyntaxHighlighter Evolved » [Plugin: SyntaxHighlighter Evolved] HTML5/XHTML5 Validation error

  • SyntaxHighlighter Evolved emits a meta tag in the head of the document which is not supported by HTML5/XHTML5 (experimental) validators.

    Error: Bad value syntaxhighlighter-version for attribute name on element meta: Keyword syntaxhighlighter-version is not registered.
    <meta id="syntaxhighlighteranchor" name="syntaxhighlighter-version" content="3.1.1" />

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


    I was under the impression that the <meta> tag name value could be anything you wanted it to be. Not sure why it’s throwing an error.

    That tag is used by a bit of Javascript to dynamically add some CSS stylesheets directly after it by the way.

    it used to validate. Now it doesn’t. Any fix? It’s the only error on my page. I’ll prefer to not spend a whole lot of time trouble shooting this.

    Actually, I hope to find out the answer to this too…I need my theme to go green! Overall, this plugin is great but just that little quirk that needs a solution.

    Not sure if this meta tag will be removed from the plugin in a next version from Viper007Bond, but for a nice valid site, I tried one thing, although it’s not really the best way, is to comment out line 570 in the syntaxhighlighter.php file…the part that begins with:
    echo '<meta id="syntaxhighlighteranchor" ..... just put a couple forward slashes in front of echo. Make sure you keep a copy of the original file before doing this incase you have to go back. Also, the messy part is updating the plugin, it will overwrite what was commented out. So far the site works and the validation is all green. Still, it’s an awesome plugin!

    Plugin Author Alex Mills (Viper007Bond)


    I’m not outputting that meta tag for fun. πŸ˜‰

    The plugin uses it as an anchor. Javascript finds it and then dynamically adds the stylesheets after it. This is better than directly before </head> because this way other stylesheets can override values.

    ah… so Alex is watching the thread here πŸ™‚

    Anyway, I still commented it out. As for css, I simply added some custom styling to my theme’s style.css instead. Of course, that is just me, and not sure it’s what others would do.

    The meta tag is just an irritating itch for me personally, but regardless, it’s still a great plugin.

    Plugin Author Alex Mills (Viper007Bond)


    ah… so Alex is watching the thread here πŸ™‚

    Yeah, I’m trying to be better about watching support threads about my plugins. πŸ™‚

    I just had an “aha!” moment — I bet I could hook onto the <title> element. This is way early in the <head> and should accomplish the same thing. πŸ™‚

    If whatever you do is an alternative and it works, I will have to buy you a grande mocha! Of course, that means coming to Vancouver…lol

    Plugin Author Alex Mills (Viper007Bond)


    I’m in Portland actually. πŸ™‚

    Vancouver, BC, Canada for moi….almost neighbors!
    Well..back to design work for me, have to get this new theme finished πŸ™‚

    I don’t know if this might do the trick or if this problem is still relevant. But what if instead of outputting it in output_header_placeholder() function, we comment it out and write anonymous jQuery function which appends it to <head /> section?

    Something like:
    $("head").before('<meta id="syntaxhighlighteranchor" name="syntaxhighlighter-version" />');

    And then simply add it through wp_enqueue_script() if functions.php

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: SyntaxHighlighter Evolved] HTML5/XHTML5 Validation error’ is closed to new replies.