Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 9 years ago

#6339 closed defect (bug) (fixed)

get_avatar produces invalid XHTML for default avatar

Reported by: otto42's profile Otto42 Owned by:
Milestone: 2.5 Priority: high
Severity: major Version: 2.5
Component: General Keywords:
Focuses: Cc:

Description

Trunk. pluggable.php, line 1253 or thereabouts.

$avatar = "<img alt='' src='{$default}' class='avatar avatar-{$size} avatar-default' height='{$size}' width='{$size}'>";

That's an unclosed image tag. It should be:

$avatar = "<img alt='' src='{$default}' class='avatar avatar-{$size} avatar-default' height='{$size}' width='{$size}' />";

Tagging this as high/major because it makes default out-of-the-box installs fail validation. Also, it's a 2 character fix.

Change History (3)

#1 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7461]) Close img tag. Props Otto42. fixes #6339

#2 @iamonlythird
9 years ago

This is not fixed. The same problem is still current in WP 4. Are there any plans to apply this fix to the next upgrade of WordPress?

#3 @Otto42
9 years ago

No, this issue is definitely fixed, as of 7 years ago. You can see that the img tags it produces have the closing slashes in the code:

https://core.trac.wordpress.org/browser/trunk/src/wp-includes/pluggable.php#L2188

Note: See TracTickets for help on using tickets.