Download & Extend

Technorati creates XHTML invalid tagging

Project:Technorati
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The img tag for the technorati hourglass has no alt text - which is mandatory for XHTML.

<!ATTLIST img
  %attrs;
  src         %URI;          #REQUIRED
  alt         %Text;         #REQUIRED
  longdesc    %URI;          #IMPLIED
  height      %Length;       #IMPLIED
  width       %Length;       #IMPLIED
  usemap      %URI;          #IMPLIED
  ismap       (ismap)        #IMPLIED
  >

Attached a small patch against 6.x branch that sets the alt text to the same as the following prefix text.

AttachmentSize
add_alt_text.patch789 bytes

Comments

#1

Status:active» closed (duplicate)

Committed. Thank you.

P.S. Please use the new code style for . (concatenate) in future patches, or use the coder module for checking the style.

#2

I thought I had. For the latest dev download coder is saying:

Line 273: string concatenation should be formatted without a space separating the operators (dot .) and a quote
  $output .= '<img alt="' . t('Technorati Tags:') . '" src="' . $path . '"/>';

Coder says that there should be a space between . and non-strings (like the call to t()) but no space between . and static strings.

If I change to

$output .= '<img alt="'. t('Technorati Tags:') .'" src="'. $path .'"/>';

taken from the patch then coder stops complaining.

This is with coder 6.x-1.0 - I haven't tried the 6.x-2.x branch - perhaps that is different?

#3

Status:closed (duplicate)» fixed

I am probably confusing Drupal 7.x coding standards (space on both sides) and Drupal 6.x (just one side).

Thanks either way, and keep the patches coming.

#4

Ah - that may be the case :) Haven't looked at d7 yet (still getting everything up to 6).

--project followup subject--

Automatically closed -- issue fixed for two weeks with no activity.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nobody click here