Changeset 7903


Ignore:
Timestamp:
2004-08-06T16:37:25+12:00 (20 years ago)
Author:
chi
Message:

Added unescaping routine for HTML entities < > &. Used in METSPlug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/ghtml.pm

    r7518 r7903  
    4040    $_[0] =~ s/>/&gt;/osg;
    4141    $_[0] =~ s/\"/&quot;/osg;
     42}
     43
     44# unescape_html(TEXT)
     45#
     46# Converts HTML entities into their original form.
     47#
     48sub unescape_html
     49{
     50    my ($html) = @_;
     51
     52    $html =~ s/&amp;/&/osg;
     53    $html =~ s/&lt;/</osg;
     54    $html =~ s/&gt;/>/osg;
     55    $html =~ s/&quot;/\"/osg;
     56
     57    return $html;
    4258}
    4359
Note: See TracChangeset for help on using the changeset viewer.