Changeset 36293


Ignore:
Timestamp:
2022-07-21T16:43:01+12:00 (3 weeks ago)
Author:
anupama
Message:

Forgot to commit minor change for GS3 to LOMPlugin previously. If GS3, no line feed character (backslash-n) added into value of the MetadataTable metadata.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/LOMPlugin.pm

    r31492 r36293  
    104104    $self->{'extra_blocks'} = {};
    105105
     106    $self->{'endline'} = ($ENV{'GSDL3SRCHOME'}) ? "" : "\n";   
     107   
    106108    return bless $self, $class;
    107109}
     
    319321    $self->{'lom_datatype'} = "";
    320322    $self->{'lom_language'} = undef;
    321     $self->{'metadatatext'} = "<table class=\"metadata\" width=\"_pagewidth_\" >\n";
     323    $self->{'metadatatext'} = "<table class=\"metadata\" width=\"_pagewidth_\" >".$self->{'endline'};
    322324    }
    323325    else {
    324326    my $xml_depth = scalar(@{$self->{'metaname_stack'}});
    325     $self->{'raw_text'} .= "\n";
     327    $self->{'raw_text'} .= $self->{'endline'};
    326328    $self->{'raw_text'} .= "&nbsp;&nbsp;" x $xml_depth;
    327329    $self->{'raw_text'} .= $raw_tag;
     
    333335        my $style = "class=\"metadata\"";
    334336        my $open_close
    335         = "<a id=\"${element}opencloselink\" href=\"javascript:hideTBodyArea('$element')\">\n";
     337        = "<a id=\"${element}opencloselink\" href=\"javascript:hideTBodyArea('$element')\">".$self->{'endline'};
    336338        $open_close
    337         .= "<img id=\"${element}openclose\" border=\"0\" src=\"_httpopenmdicon_\"></a>\n";
    338 
    339         my $header_line = "  <tr $style ><th $style colspan=\"3\">$open_close \u$element</th></tr>\n";
    340         my $md_tbody = "<tbody id=\"$element\">\n";
     339        .= "<img id=\"${element}openclose\" border=\"0\" src=\"_httpopenmdicon_\"></a>".$self->{'endline'};
     340
     341        my $header_line = "  <tr $style ><th $style colspan=\"3\">$open_close \u$element</th></tr>".$self->{'endline'};
     342        my $md_tbody = "<tbody id=\"$element\">".$self->{'endline'};
    341343
    342344        $self->{'mdheader'}     = $header_line;
     
    379381        my $tbody_text  = $self->{'mdtbody_text'};
    380382        if ($tbody_text !~ m/^\s*$/s) {
    381         my $tbody_end = "</tbody>\n";
     383        my $tbody_end = "</tbody>".$self->{'endline'};
    382384        my $table_chunk
    383385            = $header_line.$tbody_start.$tbody_text.$tbody_end;
     
    393395
    394396    my $xml_depth = scalar(@{$self->{'metaname_stack'}});
    395     $self->{'raw_text'} .= "\n";
     397    $self->{'raw_text'} .= $self->{'endline'};
    396398    $self->{'raw_text'} .= "&nbsp;&nbsp;" x $xml_depth;
    397399    $self->{'raw_text'} .= $raw_tag;
     
    525527    my $tr_attr = "$style id=\"$outermost_element\"";
    526528
    527     my $mdtext_line = "  <tr $tr_attr><td $style><nobr>$pretty_print_fmn</nobr></td>$pretty_print_text</tr>\n";
     529    my $mdtext_line = "  <tr $tr_attr><td $style><nobr>$pretty_print_fmn</nobr></td>$pretty_print_text</tr>".$self->{'endline'};
    528530    $self->{'mdtbody_text'} .= $mdtext_line;
    529531}
Note: See TracChangeset for help on using the changeset viewer.