Opened 14 years ago
Closed 14 years ago
#16351 closed defect (bug) (invalid)
Default Text Widget Creates Invalid HTML
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.4 |
Component: | General | Keywords: | Text Widget |
Focuses: | Cc: |
Description
The default text widget in default-widgets.php creates HTML that is invalid. Older browsers (specifically IE6) stop rendering when they hit the construct, disabling the entire rest of the sidebar.
The issue is that the widget includes a <div> inside a <li>, which renders fine (is ignored) in later browsers, but a) doesn't validate, and b) causes IE6 to puke, as noted above.
The specific error is line 382:
<div class="textwidget"><?php echo $instancefilter? ? wpautop($text) : $text; ?></div>
Two suggested possibilities: 1) Remove the div entirely or 2) if the class is deemed necessary, replace it with a <span class="textwidget"></span>
Change History (9)
#3
@
14 years ago
Done: http://ruproject.wordpress.com/
Still validates and looks OK in IE6.
#4
follow-up:
↓ 6
@
14 years ago
After further testing, I apologize.
The following text in the widget doesn't render in IE6. It does seem to validate:
<a href="#"><img src=" http://auto-aero.com/wp-content/uploads/2011/01/Got.jpg" alt="" /></a>This is a test
I'm not sure what the combination that causes the problem is. Is it the Image? Is it the link? I don't know but check out http://auto-aero.com. It doesn't render properly in IE6.
Chris
#5
@
14 years ago
I have two complex sites (don't lend themselves to small examples) that fail to render properly in IE6. One does not validate when the <div> is in the default text widget. If I edit default-widgets.php and remove the <div> it does validate. I apparently need to work on the specific test case.
#6
in reply to:
↑ 4
@
14 years ago
Replying to clwill:
I'm not sure what the combination that causes the problem is.
I saved that page, added a space after the link and it seems to fix the problem.
Anyway, it's a specific theme/markup issue rather than WordPress core, so support forums would be more appropriate place.
Twenty Ten with a
<div>
inside a<li>
:a) validates,
b) looks fine in IE6.
Not sure what the problem is.