Changeset 392 for AE


Ignore:
Timestamp:
Jul 6, 2009, 4:44:10 PM (10 years ago)
Author:
gumby
Message:

added escapePath, use for escaping unix strings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • AE/Installer/trunk/source/main_window.cpp

    r391 r392  
    5858#include "boost/date_time/date_parsing.hpp"
    5959#include "boost/date_time/posix_time/posix_time.hpp"
     60
     61string escapePath(string input) {
     62       
     63        string output;
     64        string escape_me = "& ;()|<>\"'\\#*?$";
     65        for(int i = 0; i < input.size(); i++)  {
     66                for(int j = 0; j < escape_me.size(); j++) if (input[i] == escape_me[j]) output += '//';
     67                output += input[i];
     68        }
     69        return output;
     70}
    6071
    6172int globalizeData(void)
Note: See TracChangeset for help on using the changeset viewer.