help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Procedures and functions] Reference for unit 'pwumain' (#powtils_main)

TrimBadChars_file

Declaration

Source position: pwumain.pas line 261

const TrimBadChars_file: function( = @TrimBadFile;

  const input: String

):String

Notes

Trims bad characters for a file name. For example, if you are opening a file, you will want the file name in a local directory, only characters like A-Z plus dots and brackets, but not things like pipe characters and dollar signs, as a pipe could cause a command to be injected if calling Exec() and user input is connected to the command some way. Trims slashes because slashes could allow one to retrieve files from other directories on the system.

See also the TrimBadDir (previously known as TrimBadChars_dir).

In future versions of Powtils, CheckBadFile and CheckBadDir functions will be available.






lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505