Source: libhtml-parser-loncapa-perl
Maintainer: Stuart Raeburn <raeburn@loncapa.org>
Section: perl
Priority: optional
Build-Depends: debhelper-compat (= 13),
               libhtml-tagset-perl,
               libtest-simple-perl,
               perl
Standards-Version: 4.7.2
Homepage: https://metacpan.org/release/HTML-Parser

Package: libhtml-parser-loncapa-perl
Architecture: any
Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}, libhtml-tagset-perl
Replaces: libhtml-parser-perl
Provides: libhtml-parser-perl
Description: HTML parser class
 Objects of the HTML::Parser class will recognize markup and separate it from
 plain text (alias data content) in HTML documents. As different kinds of
 markup and text are recognized, the corresponding event handlers are invoked.
 .
 HTML::Parser is not a generic SGML parser. We have tried to make it able to
 deal with the HTML that is actually "out there", and it normally parses as
 closely as possible to the way the popular web browsers do it instead of
 strictly following one of the many HTML specifications from W3C. Where there
 is disagreement, there is often an option that you can enable to get the
 official behaviour.
 .
 The document to be parsed may be supplied in arbitrary chunks. This makes
 on-the-fly parsing as documents are received from the network possible.
 .
 This is a modified version of the CPAN module HTML::Parser for use
 with LON-CAPA.
 .
 Modified hparser.c for use with LON-CAPA. Change to lines 1261-1275:
 .
 + if (p_state->strict_names) {
 +     attr_name_first = HCTYPE_NAME_FIRST;
 +     tag_name_char  = attr_name_char  = HCTYPE_NAME_CHAR;
 + }
 +  else {
 +      attr_name_char  = HCTYPE_NOT_SPACE_EQ_GT;
 +      if (p_state->xml_mode) {
 +          attr_name_first = HCTYPE_NOT_SPACE_SLASH_GT;
 +          tag_name_char = attr_name_char;
 +      }
 +      else { 
 +          tag_name_char = HCTYPE_NOT_SPACE_GT;
 +          attr_name_first = HCTYPE_NOT_SPACE_GT;
 +      }
 +  }
 - if (STRICT_NAMES(p_state)) {
 -     attr_name_first = HCTYPE_NAME_FIRST;
 -     tag_name_char  = attr_name_char  = HCTYPE_NAME_CHAR;
 - }
 - else {
 -     tag_name_char = HCTYPE_NOT_SPACE_GT;
 -     attr_name_first = HCTYPE_NOT_SPACE_GT;
 -     attr_name_char  = HCTYPE_NOT_SPACE_EQ_GT;
 - }
 .
