- Timestamp:
- 2006-03-09T14:50:45+13:00 (18 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/gtiaction.cpp
r11210 r11320 439 439 submission_text += &cgi_argument_name_cstr[strlen(source_chunk_key_start_cstr)]; 440 440 submission_text += "\">\n"; 441 submission_text += to_utf8( args[cgi_argument->first]) + "\n";441 submission_text += to_utf8(xml_safe(args[cgi_argument->first])) + "\n"; 442 442 submission_text += "</SourceFileText>\n"; 443 443 } … … 447 447 submission_text += &cgi_argument_name_cstr[strlen(target_chunk_key_start_cstr)]; 448 448 submission_text += "\">\n"; 449 submission_text += to_utf8( args[cgi_argument->first]) + "\n";449 submission_text += to_utf8(xml_safe(args[cgi_argument->first])) + "\n"; 450 450 submission_text += "</TargetFileText>\n"; 451 451 } … … 485 485 486 486 return text_string_escaped; 487 } 488 489 490 491 text_t gtiaction::xml_safe(const text_t &text_string) 492 { 493 text_t text_string_safe; 494 text_t::const_iterator here = text_string.begin(); 495 text_t::const_iterator end = text_string.end(); 496 while (here != end) { 497 if (*here == '<') text_string_safe += "<"; 498 else if (*here == '>') text_string_safe += ">"; 499 else text_string_safe.push_back(*here); 500 ++here; 501 } 502 503 return text_string_safe; 487 504 } 488 505 -
trunk/gsdl/src/recpt/gtiaction.h
r10148 r11320 105 105 text_t escape_all(text_t source_string, char character_to_escape); 106 106 107 text_t xml_safe(const text_t &text_string); 108 107 109 void process_gti_submissions(displayclass& disp, cgiargsclass& args, ostream& logout, bool force_submission); 108 110
Note:
See TracChangeset
for help on using the changeset viewer.