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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| add_alt_text.patch | 789 bytes |

#1
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
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
Automatically closed -- issue fixed for two weeks with no activity.