   if name == 'Anonymous'
     name = '?'
 
+
+
+
+  # IE9 gets confused if there is an image without a src
+  # Chrome puts a weird gray border around IMGs without a src
+  tag = if !props.src? then SPAN else IMG
+
+  alt = props.alt 
+  delete props.alt if props.alt? 
+
   attrs = _.extend {}, props,
     className: "avatar #{props.className or ''}"
     id: id

    user = fetch(e.target.getAttribute('data-user'))
    anonymous = e.target.getAttribute('data-anonymous') == 'true'

    name = user_name user, anonymous

    if !anonymous && filters = customization 'opinion_filters'
      for filter in filters 
        if filter.pass(user) && filter.icon
          if typeof(filter.icon) != 'string'
            icon = filter.icon(user)
          else
            icon = filter.icon 
          name += '<span style="padding: 0 0 0 12px">' + icon + "</span>"


    tooltip = fetch 'tooltip'
    tooltip.coords = $(e.target).offset()
    tooltip.tip = name
    save tooltip

hide_tooltip = (e) ->
  if e.target.getAttribute('data-user') && e.target.getAttribute('data-showtooltip') == 'true'
    tooltip = fetch 'tooltip'
    tooltip.coords = null
    save tooltip

    'data-showtooltip': !props.hide_tooltip
    'data-anon': anonymous      
    style: style
    tabIndex: if props.focusable then 0 else -1

  attrs[(if tag == SPAN then 'title' else 'alt')] = alt?.replace('<user>', name) or name

  tag attrs,
    if add_initials
