====== makeSafe ======
{#JAPI Joomla.Framework FileSystem JFile::makeSafe #}
Makes file name safe to use. This function filters out unsafe character sequences from the given file name. The [[http://php.net/manual/reference.pcre.pattern.syntax.php|regular expression]] used is: #\.\.[^A-Za-z0-9\.\_\- ]#. This will take out the combination of two dots (..) followed by anything that is not a letter, a number, a dot (.), an underscore (_), a hyphen (-) or a space ( ).
===== Syntax =====
string makeSafe ( **$file** )
| **$file** | string | is a string containing the name of the file [not full path]. |
===== Examples =====
Example: This example gets the extension of a file.
echo JFile::makeSafe( '..%clock.jpg' );
which will produce:
clock.jpg
----
~~DISCUSSION~~