A few fixes to generate valid XHTML
| Project: | addtofavorites |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Hi,
can someone please add the following changes to addtofavorites.module to make it generate valid XHTML ...
line 146 old : href=\"javascript:addtofavorites";
line 146 new : href=\"#\" onclick=\"javascript:addtofavorites";
line 150 old: $links .= " alt=\"" . $display_text_site . "\" align=\"absmiddle\" />";
line 150 new: $links .= " alt=\"" . $display_text_site . "\" style=\"vertical-align:absmiddle;\" />";
line 154 old: $links .= "
\n"; //if we don't display links then align horizontally the icons
line 154 new: $links .= "
\n"; //if we don't display links then align horizontally the icons
Similar changes need to be made on lines 159,163,167,176.
Or you could just swap in the attached patched version.
Once done, addtofavorites will be generating a block of valid XHTML.
thanks,
Matt
| Attachment | Size |
|---|---|
| addtofavorites.module.php_.txt | 7.87 KB |

#1
Ok for :
line 146 old : href=\"javascript:addtofavorites";
line 146 new : href=\"#\" onclick=\"javascript:addtofavorites";
For :
line 150 old: $links .= " alt=\"" . $display_text_site . "\" align=\"absmiddle\" />";
line 150 new: $links .= " alt=\"" . $display_text_site . "\" style=\"vertical-align:absmiddle;\" />";
==> this make the icon not correctly aligned with the text, so didn't used it in new version
line 154 old: $links .= "
==> I don't undestand the modoification
Alreeady commited the 1st change, need explanation for the 3rd one, and a slight change for the second one to commit them also
#2
Hi,
the vertical-align:absmiddle css rule 'should' look the same as align='absmiddle', but experimentation might be required to find a suitable replacement for the deprecated align attribute.
The third change should have read ...
change [br] tags to [br /] tags.
cheers,
Matt
#3
OK for changing [br] tags to [br /] tags.
For vertical-align: ... experimentation is required
Commited with change on br. Will commit again with modification on alignment when find the right alignment
#4
Fixed the alignment
#5