|
|
|
@ -183,12 +183,12 @@ bool Index::parseDocumentToStringlist( const TQString & filename, TQStringList &
|
|
|
|
|
{
|
|
|
|
|
STATE_OUTSIDE_TAGS, // outside HTML tags; parse text
|
|
|
|
|
STATE_IN_HTML_TAG, // inside HTML tags; wait for end tag
|
|
|
|
|
STATE_IN_TQUOTES, // inside HTML tags and inside quotes; wait for end quote (in var QuoteChar)
|
|
|
|
|
STATE_IN_QUOTES, // inside HTML tags and inside quotes; wait for end quote (in var QuoteChar)
|
|
|
|
|
STATE_IN_HTML_ENTITY, // inside HTML entity; parse the entity
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
state_t state = STATE_OUTSIDE_TAGS;
|
|
|
|
|
TQChar QuoteChar; // used in STATE_IN_TQUOTES
|
|
|
|
|
TQChar QuoteChar; // used in STATE_IN_QUOTES
|
|
|
|
|
|
|
|
|
|
for ( unsigned int j = 0; j < text.length(); j++ )
|
|
|
|
|
{
|
|
|
|
@ -203,7 +203,7 @@ bool Index::parseDocumentToStringlist( const TQString & filename, TQStringList &
|
|
|
|
|
// Ignore everything until we see '>' (end of HTML tag) or quote char (quote start)
|
|
|
|
|
if ( ch == '"' || ch == '\'' )
|
|
|
|
|
{
|
|
|
|
|
state = STATE_IN_TQUOTES;
|
|
|
|
|
state = STATE_IN_QUOTES;
|
|
|
|
|
QuoteChar = ch;
|
|
|
|
|
}
|
|
|
|
|
else if ( ch == '>' )
|
|
|
|
@ -211,7 +211,7 @@ bool Index::parseDocumentToStringlist( const TQString & filename, TQStringList &
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
else if ( state == STATE_IN_TQUOTES )
|
|
|
|
|
else if ( state == STATE_IN_QUOTES )
|
|
|
|
|
{
|
|
|
|
|
// We are inside quoted text inside HTML tag.
|
|
|
|
|
// Ignore everything until we see the quote character again
|
|
|
|
|