Ignore:
Timestamp:
2011-11-14T13:04:44+13:00 (12 years ago)
Author:
sjm84
Message:

Fixed highlighting inside tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r24812 r24813  
    878878        boolean in_word = false;
    879879        boolean preceding_word_matched = false;
     880        boolean inTag = false;
    880881        for (int i = 0; i < content_characters.length; i++)
    881882        {
     883            //We don't want to find words inside HTML tags
     884            if(content_characters[i] == '<')
     885            {
     886                inTag = true;
     887                continue;
     888            }
     889            else if (inTag && content_characters[i] == '>')
     890            {
     891                inTag = false;
     892            }
     893            else if (inTag)
     894            {
     895                continue;
     896            }
     897           
    882898            boolean is_character_letter_or_digit = Character.isLetterOrDigit(content_characters[i]);
    883899
Note: See TracChangeset for help on using the changeset viewer.