Need correct filename escaping when insert it to DB
To work correctly with all the valid set of characters in file names, you must ensure that they are screening at the records in the database. Respective functions should be used, depending on which database is used:
- sqlite_escape_string for SQLite
- mysql_real_escape_string for MySQL/MariaDB
- pg_escape_string for PostgreSQL