Changeset 7387
- Timestamp:
- 2004-05-24T16:41:00+12:00 (20 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/htmlutils.cpp
r1285 r7387 41 41 return outstring; 42 42 } 43 44 45 text_t javascript_safe (const text_t &instring) { 46 47 text_t outstring; 48 text_t::const_iterator here = instring.begin(); 49 text_t::const_iterator end = instring.end(); 50 while (here != end) { 51 if (*here == '"') outstring += """; 52 else if (*here == '\'') outstring += "\\'"; 53 else outstring.push_back(*here); 54 here ++; 55 } 56 return outstring; 57 } -
trunk/gsdl/src/recpt/htmlutils.h
r1285 r7387 32 32 33 33 text_t html_safe (const text_t &instring); 34 text_t javascript_safe (const text_t &instring); 34 35 35 36 #endif
Note:
See TracChangeset
for help on using the changeset viewer.