Show
Ignore:
Timestamp:
08.02.2012 18:04:13 (8 years ago)
Author:
davidb
Message:

'attr' as an attribute in HTML, passed straight through to Expeditee added in

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs3-extensions/html-to-expeditee/trunk/src/perllib/ExpediteeFrameIO.pm

    r25057 r25060  
    467467    my $attr = convertStyleToAttr($html_node->{'style'}); 
    468468 
     469    if (defined $html_node->{'attr'}) { 
     470        # values provided in 'attr' explicitly overwrite any values  
     471        # derived from CSS style 
     472 
     473        my $direct_attr_str = $html_node->{'attr'}; 
     474        my @direct_attr_array = split(/\s*;\s*/,$direct_attr_str); 
     475        foreach my $da (@direct_attr_array) { 
     476        my ($key,$val) = ($da =~ m/^(.)\s*(.*)$/); 
     477        $attr->{$key} = $val; 
     478        } 
     479    } 
     480 
    469481    $self->addRect($xl,$yt,$xr,$yb,$attr); 
    470482