WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 months ago

#6339 closed defect (bug) (fixed)

get_avatar produces invalid XHTML for default avatar

Reported by: 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)

comment:1 @ryan7 years ago

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

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

comment:2 @iamonlythird6 months 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?

comment:3 @Otto426 months 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.