Ignore:
Timestamp:
2006-12-07T17:32:49+13:00 (17 years ago)
Author:
kjdon
Message:

cgi_safe was sometimes getting passed in unicode, sometimes utf-8. for one of these, it needs to encode chars about 127, for the other, chars above 255. The change I made last time, 255->127 mucked up the e arg for search terms e.g with diacritics. that change had been to make cgisafe work for metadata with diacritics in format statements. so now there are two cgi-safe methods, one for utf8, one for unicode. minus_safe also takes an arg for utf8 or not. Also, removed + from the list of chars to output directly. a space gets output as a +. so we need to encode + - this will enable a + to be used in a search string. hope it doesn't break anything else...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/cgiutils.h

    r12513 r13456  
    4747
    4848// turns any '-' in a cgi argument into "(-)"
    49 text_t minus_safe (const text_t &intext);
     49// set utf8 to true if input is in utf-8, otherwise expects input in unicode
     50text_t minus_safe (const text_t &intext, bool utf8);
    5051
    5152// returns the encoded version of a cgi argument
    52 text_t cgi_safe (const text_t &intext);
     53// the original text should be in utf8
     54text_t cgi_safe_utf8 (const text_t &intext);
     55// the original text should be in unicode
     56text_t cgi_safe_unicode (const text_t &intext);
    5357
    5458// check_save_conf_str checks the configuration string for
Note: See TracChangeset for help on using the changeset viewer.