Ignore:
Timestamp:
2008-10-15T17:21:15+13:00 (16 years ago)
Author:
mdewsnip
Message:

Moved the xml_safe() function from gtiaction into gsdltools, so it can be used by other classes.

Location:
gsdl/trunk/runtime-src/src/recpt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/recpt/gtiaction.cpp

    r13941 r17545  
    655655
    656656
    657 text_t gtiaction::xml_safe(const text_t &text_string)
    658 {
    659   text_t text_string_safe;
    660   text_t::const_iterator here = text_string.begin();
    661   text_t::const_iterator end = text_string.end();
    662   while (here != end) {
    663     if (*here == '&') text_string_safe += "&";
    664     else if (*here == '<') text_string_safe += "&lt;";
    665     else if (*here == '>') text_string_safe += "&gt;";
    666     else text_string_safe.push_back(*here);
    667     ++here;
    668   }
    669 
    670   return text_string_safe;
    671 }
    672 
    673 
    674 
    675657char* xml_get_attribute(const char** attributes, char* attribute_name)
    676658{
  • gsdl/trunk/runtime-src/src/recpt/gtiaction.h

    r13692 r17545  
    107107  text_t escape_all(text_t source_string, char character_to_escape);
    108108
    109   text_t xml_safe(const text_t &text_string);
    110 
    111109  void process_gti_submissions(displayclass& disp, cgiargsclass& args, ostream& logout, bool force_submission);
    112110
Note: See TracChangeset for help on using the changeset viewer.