Changeset 529 for trunk/src/xmldecl.c


Ignore:
Timestamp:
Jul 22, 2010, 12:01:37 PM (9 years ago)
Author:
cameron
Message:

Encoding Name validation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xmldecl.c

    r166 r529  
    127127
    128128template <CodeUnit_Base C>
    129 inline void XML_Decl_Parser<C>::ScanToQuote() {
    130         int quote_start_pos = buffer_rel_pos;   
    131         while (!AtQuote<C>(cur())) buffer_rel_pos+=1;
     129inline void XML_Decl_Parser<C>::ScanToEncodingName() {
     130        int quote_start_pos = buffer_rel_pos;
     131        if (at_ASCII_letter<C>(cur())) {
     132          buffer_rel_pos+=1;
     133          while (at_ASCII_ncnamechar<C>(cur())) buffer_rel_pos+=1;
     134        }
    132135        if (buffer_rel_pos >= BYTEPLEX_SIZE) {
    133136                byteplex->AdvanceInputBuffer(quote_start_pos);
     
    168171                Advance(1);
    169172                int start_pos = AbsPos();
    170                 ScanToQuote();
     173                ScanToEncodingName();
    171174                if (cur()[0] != quoteCh) DeclError();
    172175                int lgth = AbsPos() - start_pos;
Note: See TracChangeset for help on using the changeset viewer.