Renders invalid HTML

gabble - June 30, 2008 - 09:27
Project:Counter
Version:5.x-1.7
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

In counter.module I replaced:

line 258:
$output .= '<li/>'.t('Site Counter: '). ($counter_initial_counter+$counter_total);
with:
$output .= '<li>'.t('Site Counter: '). ($counter_initial_counter+$counter_total). '</li>';

line 266:
$output .= '<li/>'.t('Unique Visitor: '). ($counter_initial_unique_visitor+$counter_unique);
with:
$output .= '<li>'.t('Unique Visitor: '). ($counter_initial_unique_visitor+$counter_unique). '</li>';

line 274:
$output .= '<li/>'.t('Registered Users: '). ($total);
with:
$output .= '<li>'.t('Registered Users: '). ($total). '</li>';

line 282:
$output .= '<li/>'.t('Unregistered Users: '). ($total);
with:
$output .= '<li>'.t('Unregistered Users: '). ($total). '</li>';

line 290:
$output .= '<li/>'.t('Published Nodes: '). ($total);
with:
$output .= '<li>'.t('Published Nodes: '). ($total). '</li>';

line 298:
$output .= '<li/>'.t('Unpublished Nodes: '). ($total);
with:
$output .= '<li>'.t('Unpublished Nodes: '). ($total). '</li>';

line 302:
$output .= '<li/>'.t("Your IP: ").$counter_ip;
with:
$output .= '<li>'.t("Your IP: ").$counter_ip . '</li>';

line 312:
$output .= '<li/>'.t("Since: "). $counter_since;
with:
$output .= '<li>'.t("Since: "). $counter_since . '</li>';

line 314:
$output .= '<li/>'.t("Since: "). $counter_initial_since;
with:
$output .= '<li>'.t("Since: "). $counter_initial_since . '</li>';

Sorry, I can't make patch or diff files! :-(
Hope this helped!

#1

Drupal-id.com - July 7, 2008 - 02:29

I think <li/> same as <li> and </li>, right? We can use <li/> if the list only contain 1 row. I am not HTML expert, thought?

#2

gabble - July 7, 2008 - 06:54

You can't use:

<ul>
<li/>item1
<li/>item2
</ul>

but instead:

<ul>
<li>item1</li>
<li/>item2</li>
</ul>

<li/> could be a XML shortcut to <li></li> (would be better <li />, with a space), but that's not the case.

#3

gabble - August 25, 2008 - 15:35
Version:5.x-1.6» 5.x-1.7

Version 1.7 is out and the issue has not been fixed.

#4

gabble - August 29, 2008 - 14:13

Version 1.8 did not fix the issue.
mmh… :-/

#5

Drupal-id.com - September 19, 2008 - 02:36
Status:active» closed

5.x-1.9: Bug fix: invalid

  • HTML (by gabble)
  • #6

    gabble - October 1, 2008 - 06:20

    fine! thank you! :-)

     
     

    Drupal is a registered trademark of Dries Buytaert.