Changeset 13131
- Timestamp:
- 2006-10-19T11:28:29+13:00 (18 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/gtiaction.cpp
r12565 r13131 33 33 #include <sys/utsname.h> 34 34 #include "gtiaction.h" 35 #include "cgiutils.h" 35 36 #include "fileutil.h" 36 37 #include "gsdlunicode.h" … … 468 469 submission_text += &cgi_argument_name_cstr[strlen(source_chunk_key_start_cstr)]; 469 470 submission_text += "\">\n"; 470 submission_text += to_utf8(xml_safe( unescape_commas(args[cgi_argument->first]))) + "\n";471 submission_text += to_utf8(xml_safe(decode_commas(args[cgi_argument->first]))) + "\n"; 471 472 submission_text += "</SourceFileText>\n"; 472 473 } … … 476 477 submission_text += &cgi_argument_name_cstr[strlen(target_chunk_key_start_cstr)]; 477 478 submission_text += "\">\n"; 478 submission_text += to_utf8(xml_safe( unescape_commas(args[cgi_argument->first]))) + "\n";479 submission_text += to_utf8(xml_safe(decode_commas(args[cgi_argument->first]))) + "\n"; 479 480 submission_text += "</TargetFileText>\n"; 480 481 } … … 514 515 515 516 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;537 517 } 538 518 -
trunk/gsdl/src/recpt/gtiaction.h
r12565 r13131 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 111 109 text_t xml_safe(const text_t &text_string); 112 110
Note:
See TracChangeset
for help on using the changeset viewer.