Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 12 years ago

#6339 closed defect (bug) (fixed)

get_avatar produces invalid XHTML for default avatar

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

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
19 years ago

  • Resolution → fixed
  • Status new → closed

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

#2 @iamonlythird
12 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
12 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.