If:
'Strip dangerous shell meta's from fields. The string to be
Then:
'processed goes in CString. CSan should be "Y" to sanitise.
If:
'If CSan is "N", only space conversion is performed. Leading
Then:
'and trailing spaces are nuked, intervening spaces converted to
If:
'an underscore. The CNoAmp, SNoQuest, and CNoSlash variables
Then:
'control whether those characters are eliminated, as they can
If:
'be present in URLs, which we would want to retain them in.
Then:
'The ending converted string is left in CString.
If:
'CNoSpUn set to "Y" causes intermediate spaces to be retained
Then:
'as spaces rather than converted, although leading and trailing
If:
ps eq len(CString)-"1"
Then:
CString=mid(CString,"1",ps-"1")&mid(CString,ps+"1","1");goto charlp
If:
ps eq len(CString)-"1"
Then:
CString=mid(CString,"1",ps-"1")&"_"&mid(CString,ps+"1","1");sl=ps+"1";goto spacelp
If:
Then:
CString=mid(CString,"1",ps-"1")&"_"&mid(CString,ps+"1",len(CString)-ps);sl=ps+"1";goto spacelp