WordPress.org

Ready to get started?Download WordPress

Forums

Rotating Tweets (Twitter widget and shortcode)
[resolved] Invalid Markup (8 posts)

  1. nox969
    Member
    Posted 10 months ago #

    The plugin is causing an invalid html5 markup. most of the errors are:

    "& did not start a character reference. (& probably should have been escaped as &.)" - due to the twitter query url structure

    there is one: Consecutive hyphens did not terminate a comment. -- is not permitted inside a comment, but e.g. - - is.
    for:
    <!-- Using OAuth - version 1.1 of API -- statuses/user_timeline -->

    is there a fix on the way, or should I just hack/change the code to sort the problem.

    Thanks

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

  2. Martin Tod
    Member
    Plugin Author

    Posted 10 months ago #

    I've fixed the double -- and, I hope the &

    Does the development version work for you?

    Martin

  3. nox969
    Member
    Posted 10 months ago #

    Hi,
    yes the dev version has sorted everything except the css link..

    I would suggest you change from single to double Quotation marks and see if that solves the validation issue (as the error is "Element link is missing required attribute property" but the code appears valid... unfortunately dont have time to dig further into it right now)

    thanks

  4. Martin Tod
    Member
    Plugin Author

    Posted 10 months ago #

    I've put everything into the latest version apart from adding an 'alt' code to an image that didn't have one (which is now in the 'dev' version).

    Where's the CSS problem? I can't replicate it. The CSS itself validates as CSS level 3!

    Martin

  5. nox969
    Member
    Posted 10 months ago #

    its actually the fact that html5 will not validate if you include the stylesheet with link..

    a possible initial resource: http://www.peterrknight.com/loading-javascript-and-css-mid-page-html5-wordpress-passing-validation-part-1/

  6. Martin Tod
    Member
    Plugin Author

    Posted 10 months ago #

    It seems to be a bit more complicated even than that.

    It will validate if you're using RT with a widget - because the stylesheet goes in the header.

    But if you're only using RT as a shortcode, then there's a risk that the stylesheet goes at the bottom - which will render - but will also break HTML 5 validators. (A problem that's presumably common to all shortcodes that call a stylesheet).

    I'm tempted to leave this to the WordPress team to sort out!

    Alternatively, I'll need some code that spots the shortcode before rendering the header and puts the CSS up front. Perhaps a hook early in the page that examines the text for [rotatingtweets. Feels like a bit of a hack though!

  7. Martin Tod
    Member
    Plugin Author

    Posted 10 months ago #

    The development version now shoves the CSS into the header whether or not there's a shortcode.

    Not ideal, but I reckon a 2.5 kB download is probably less time-consuming than the code to spot whether the CSS is needed or not.

    Does that solve the problem?

  8. Jay Collier
    Member
    Posted 9 months ago #

    The development version resolved the problem for me. Thank you for your responsiveness!

Reply

You must log in to post.

About this Plugin

About this Topic