Changeset 264
- Timestamp:
- 1999-06-09T12:09:30+12:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/htmlutils.cpp
r155 r264 12 12 /* 13 13 $Log$ 14 Revision 1.3 1999/06/09 00:09:30 sjboddie 15 Added a fairly minimal html_safe function 16 14 17 Revision 1.2 1999/02/08 01:28:02 rjmcnab 15 18 … … 29 32 #include "htmlutils.h" 30 33 34 text_t html_safe (const text_t &instring) { 35 36 text_t outstring; 37 text_t::const_iterator here = instring.begin(); 38 text_t::const_iterator end = instring.end(); 39 while (here != end) { 40 if (*here == '"') outstring += """; 41 else if (*here == '&') outstring += "&"; 42 else if (*here == '<') outstring += "<"; 43 else if (*here == '>') outstring += ">"; 44 else outstring.push_back(*here); 45 here ++; 46 } 47 return outstring; 48 } 31 49 32 50 33 -
trunk/gsdl/src/recpt/htmlutils.h
r108 r264 14 14 #define HTMLUTILS_H 15 15 16 #include "gsdlconf.h" 17 #include "text_t.h" 16 18 17 19 text_t html_safe (const text_t &instring); 18 20 19 21 #endif
Note:
See TracChangeset
for help on using the changeset viewer.