[resolved] Strange sidebar widget behavior (5 posts)

  1. yosemite
    Posted 10 years ago #

    Noticed some validation issues and was alarmed at this:

    <li class="pagenav">

    <h2 class="&quot;widgettitle&quot;"> Pages </h2>

    Should be:
    <h2 class="widgettitle"> Pages </h2>

    This isn't happening with any other widgets, just the 'pagenav'/Pages widget (regardless of theme).

    Any ideas where I would track this down? I've looked at widgets.php and can't find anything wrong...

  2. yosemite
    Posted 10 years ago #

    More info?:

    'Error Line 360, column 30: an attribute value must be a literal unless it contains only name characters .

    <li class="pagenav"><h2 class=\"widgettitle\">Pages</h2>

    Still can't track this down. I am using sidebar widgets, so I would think the problem would be in widgets.php, but: $title = htmlspecialchars($options['title'], ENT_QUOTES);` is used for for all the default widgets and I'm not seeing the problem in their titles...

    Any ideas?

  3. yosemite
    Posted 10 years ago #

    I finally gave up on this. For the life of me I couldn't find the problem...

    So, I removed the "Pages" sidebar widget from the active sidebar and no more error. bleh.

  4. homechicken
    Posted 9 years ago #

    I just solved this problem on my site, with my custom-written theme. I had the exact same problem. I'm now validated XHTML 1.0 Strict. Dig in to wp-content/plugins/widgets/widgets.php, line 54, and modify the
    'before_title' => '<h2 class="widgettitle">',
    line and remove the class="widgettitle" part. My stylesheet didn't even use it. Yours might not either. I believe the before_title is being sent with the Widget title and having its quotes escaped somewhere down the road. It's a pain in the rear, but I finally found it. Hope this helps.

  5. yosemite
    Posted 9 years ago #

    Actually updating widgets.php and upgrading to 2.0.4 fixed it ;') Thanks though...

Topic Closed

This topic has been closed to new replies.

About this Topic