Changeset 7023


Ignore:
Timestamp:
2004-03-12T11:47:22+13:00 (20 years ago)
Author:
kjdon
Message:

fixed up the <tag> display for pluginfo and clasinfo. < and > should not be escaped in the strings, but they are doubly escaped (&amp;lt;) in the xml output

Location:
trunk/gsdl/perllib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/BasClas.pm

    r6987 r7023  
    113113    &gsprintf(STDERR, "<ClassInfo>\n");
    114114    &gsprintf(STDERR, "  <Name>$classifieroptions->{'name'}</Name>\n");
    115     &gsprintf(STDERR, "  <Desc>$classifieroptions->{'desc'}</Desc>\n");
     115    my $desc = &gsprintf::lookup_string($classifieroptions->{'desc'});
     116    $desc =~ s/</&amp;lt;/g; # doubly escaped
     117    $desc =~ s/>/&amp;gt;/g;
     118    &gsprintf(STDERR, "  <Desc>$desc</Desc>\n");
    116119    &gsprintf(STDERR, "  <Abstract>$classifieroptions->{'abstract'}</Abstract>\n");
    117120    &gsprintf(STDERR, "  <Inherits>$classifieroptions->{'inherits'}</Inherits>\n");
  • trunk/gsdl/perllib/plugins/BasPlug.pm

    r6987 r7023  
    175175    &gsprintf(STDERR, "<PlugInfo>\n");
    176176    &gsprintf(STDERR, "  <Name>$pluginoptions->{'name'}</Name>\n");
    177     &gsprintf(STDERR, "  <Desc>$pluginoptions->{'desc'}</Desc>\n");
     177    my $desc = &gsprintf::lookup_string($pluginoptions->{'desc'});
     178    $desc =~ s/</&amp;lt;/g; # doubly escaped
     179    $desc =~ s/>/&amp;gt;/g;
     180   
     181    &gsprintf(STDERR, "  <Desc>$desc</Desc>\n");
    178182    &gsprintf(STDERR, "  <Abstract>$pluginoptions->{'abstract'}</Abstract>\n");
    179183    &gsprintf(STDERR, "  <Inherits>$pluginoptions->{'inherits'}</Inherits>\n");
  • trunk/gsdl/perllib/printusage.pm

    r6945 r7023  
    8787
    8888    # Escape '<' and '>' characters
    89     $optiondesc =~ s/</&lt;/g;
    90     $optiondesc =~ s/>/&gt;/g;
     89    $optiondesc =~ s/</&amp;lt;/g; # doubly escaped
     90    $optiondesc =~ s/>/&amp;gt;/g;
    9191
    9292    # Display option name, description and type
     
    117117
    118118            # Escape '<' and '>' characters
    119             $optionvaluedesc =~ s/</&lt;/g;
    120             $optionvaluedesc =~ s/>/&gt;/g;
     119            $optionvaluedesc =~ s/</&amp;lt;/g; #doubly escaped
     120            $optionvaluedesc =~ s/>/&amp;gt;/g;
    121121
    122122            &gsprintf(STDERR, "          <Desc>$optionvaluedesc</Desc>\n");
     
    144144
    145145        # Escape '<' and '>' characters
    146         $optiondeftvalue =~ s/</&lt;/g;
    147         $optiondeftvalue =~ s/>/&gt;/g;
     146        $optiondeftvalue =~ s/</&amp;lt;/g; #doubly escaped
     147        $optiondeftvalue =~ s/>/&amp;gt;/g;
    148148
    149149        &gsprintf(STDERR, "      <Default>$optiondeftvalue</Default>\n");
Note: See TracChangeset for help on using the changeset viewer.