Technorati creates XHTML invalid tagging

chrissearle - October 7, 2008 - 10:16
Project:Technorati
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

kbahey - October 7, 2008 - 14:40
Status:active» 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

chrissearle - October 8, 2008 - 08:11

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

kbahey - October 8, 2008 - 16:07
Status: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

chrissearle - October 9, 2008 - 08:25

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

--project followup subject--

Anonymous (not verified) - October 23, 2008 - 08:35

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

#5

Anonymous (not verified) - October 23, 2008 - 08:42
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.