- for (@{ $self->{anno} }) {
- if ($_ eq 'html') {
- require HTML::Entities;
- if (my $_ = $HTML::Entities::char2entity{$cell}) {
- $anno = sprintf(' <small class="digraph">%s</small>', EscapeHTML($_));
- last;
+ if ($cell ne '') {
+ for (@{ $self->{anno} }) {
+ if (/html$/) {
+ require HTML::Entities;
+ if (my $entity = $HTML::Entities::char2entity{$cell}) {
+ $entity = substr($entity, 1, -1) unless /^&/;
+ $anno = sprintf(' <small class="digraph">%s</small>', EscapeHTML($entity));
+ last;
+ }