Changeset 12565
- Timestamp:
- 2006-08-25T14:44:12+12:00 (18 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/gtiaction.cpp
r12485 r12565 468 468 submission_text += &cgi_argument_name_cstr[strlen(source_chunk_key_start_cstr)]; 469 469 submission_text += "\">\n"; 470 submission_text += to_utf8(xml_safe( args[cgi_argument->first])) + "\n";470 submission_text += to_utf8(xml_safe(unescape_commas(args[cgi_argument->first]))) + "\n"; 471 471 submission_text += "</SourceFileText>\n"; 472 472 } … … 476 476 submission_text += &cgi_argument_name_cstr[strlen(target_chunk_key_start_cstr)]; 477 477 submission_text += "\">\n"; 478 submission_text += to_utf8(xml_safe( args[cgi_argument->first])) + "\n";478 submission_text += to_utf8(xml_safe(unescape_commas(args[cgi_argument->first]))) + "\n"; 479 479 submission_text += "</TargetFileText>\n"; 480 480 } … … 514 514 515 515 return text_string_escaped; 516 } 517 518 519 520 text_t gtiaction::unescape_commas(text_t text_string) 521 { 522 text_t text_string_commas_unescaped = ""; 523 524 text_t::iterator text_string_character = text_string.begin(); 525 while (text_string_character != text_string.end()) { 526 if (*text_string_character == '%' && (text_string_character+1) != text_string.end() && *(text_string_character+1) == '2' && (text_string_character+2) != text_string.end() && *(text_string_character+2) == 'C') { 527 text_string_commas_unescaped += ","; 528 text_string_character += 2; 529 } 530 else { 531 text_string_commas_unescaped.push_back(*text_string_character); 532 } 533 text_string_character++; 534 } 535 536 return text_string_commas_unescaped; 516 537 } 517 538 -
trunk/gsdl/src/recpt/gtiaction.h
r11460 r12565 107 107 text_t escape_all(text_t source_string, char character_to_escape); 108 108 109 text_t unescape_commas(text_t source_string); 110 109 111 text_t xml_safe(const text_t &text_string); 110 112
Note:
See TracChangeset
for help on using the changeset viewer.