Changeset 37095


Ignore:
Timestamp:
2023-01-04T20:59:24+13:00 (16 months ago)
Author:
davidb
Message:

Added block to deal with a TEXT_NODE (which can occur when CGI arg 'excerptid-text' is used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XMLConverter.java

    r34112 r37095  
    504504        }
    505505
    506         // TEXT and PROCESSING_INSTRUCTION nodes are handled inside their containing element node
     506        else if (nodeType == Node.TEXT_NODE)
     507        {
     508            String text = xmlNode.getNodeValue();
     509            /*
     510            if (output_escaping) {
     511                text = StringUtils.replace(text, "&", "&");
     512                text = StringUtils.replace(text, "<", "&lt;");
     513                text = StringUtils.replace(text, ">", "&gt;");
     514                text = StringUtils.replace(text, "'", "&apos;");
     515                text = StringUtils.replace(text, "\"", "&quot;");
     516            }
     517            // Remove any control-C characters
     518            text = StringUtils.replace(text, "" + (char) 3, "");
     519            */
     520           
     521            xmlRepresentation.append(text);
     522        }
     523       
     524        // PROCESSING_INSTRUCTION nodes are handled inside their containing element node
    507525        // A type of node that is not handled yet
    508526        else
Note: See TracChangeset for help on using the changeset viewer.