When I use the line print $node->content['fivestar_widget']['#value'] or print $comment->fivestar_view (with the comments module) in my template, the following (or similar) HTML is generated:

4.666665

This causes the HTML to not validate because of the empty

"Warning: trimming empty ."

Comments

Balrog’s picture

Looks like it got dropped ...

<div class="fivestar-widget-static fivestar-widget-static-vote fivestar-widget-static-5 clear-block"><div class="star star-1 star-odd star-first"><span class="on">4</span></div><div class="star star-2 star-even"><span class="on"></span></div><div class="star star-3 star-odd"><span class="on"></span></div><div class="star star-4 star-even"><span class="on"></span></div><div class="star star-5 star-odd star-last"><span class="off"></span></div></div>

quicksketch’s picture

Title: HTML generated by fivestar-static is not valid HTML, "trimming empty <span>" » Tidy gives warning: "trimming empty <span>" with Fivestar
Priority: Normal » Minor

Empty tags are valid XHTML, that's actually just a message generated by Tidy when it parses the page (assuming that's what you're using to do the validation). If you run the HTML against http://validator.w3.org/, you'll see that it validates just fine. However it would still be nice to get rid of that warning, even if it's only generated by Tidy.

Balrog’s picture

Yes, I was using Tidy. I use the serial validator in the Firefox extension.

phoehne’s picture

you could overwrite the theme function 'theme_fivestar_static' an simply add an else tree to this if condition:
if ($n == 1)$output .= $numeric_rating; (zeile 1417)

there you put an html comment and your warnings are gone

peter

giorgio79’s picture

Just noticed this as well, I prefer a clean html also :)

Peter can you put your suggestion in tags to be clear where to comment out stuff?

ezra-g’s picture

Status: Active » Needs work

Marking as needs work so that the folks concerned about this can roll a patch for others to test.

whiteph’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

We can no longer support the Drupal 6 version of Fivestar. It is in security maintenance mode only. When the Drupal 8 version of Fivestar is released, the Drupal 6 version will be officially deprecated. However, if a volunteer can be found who is willing to test patches for the Drupal 6 version, we could revert it to normal maintenance. See Help testing Drupal 6 patches.