WordPress.org

Ready to get started?Download WordPress

Forums

Double-quoted attribute values! (Patch included) (3 posts)

  1. blodulv
    Member
    Posted 9 years ago #

    Links in the sidebar were showing up with single-quoted attribute values, which isn't XHTML compliant.

    Here's my quick patch:


    219c219
    < $rel = " rel='$rel'";
    ---
    > $rel = " rel=\"$rel\"";
    234c234
    < $title = " title='$title'";
    ---
    > $title = " title=\"$title\"";
    237c237
    < $alt = " alt='$name'";
    ---
    > $alt = " alt=\"$name\"";
    241c241
    < $target = " target='$target'";
    ---
    > $target = " target=\"$target\"";
    244c244
    < $output.= "<a href='$the_link'";
    ---
    > $output.= "<a href=\"$the_link\"";
    250c250
    < $output.= "<img src='$row->link_image' $alt $title />";
    ---
    > $output.= "<img src=\"$row->link_image\" $alt $title />";
    252c252
    < $output.= "<img src='" . get_settings('siteurl') . "$row->link_image' $alt $title />";
    ---
    > $output.= "<img src=\"" . get_settings('siteurl') . "$row->link_image\" $alt $title />";

  2. Kafkaesqui

    Posted 9 years ago #

    Single quotes are valid (double-quotes are only recommended), but for those who want consistency, your post should help some.

  3. blodulv
    Member
    Posted 9 years ago #

    My apologies, the source I went to must have gotten it wrong. :/

Topic Closed

This topic has been closed to new replies.

About this Topic