Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Filename normalize rules & behavior changed #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hranicka
Copy link

@hranicka hranicka commented Aug 1, 2014

I think that _normalizeFilenames should be turned on by default because user shouldn't create invalid file and directory names.

I changed behavior of normalizer like this:

  • uploader::checkFilename() doesn't check for regexp -> when we change normalizing function, the previous implementation of checkFilename had own rules and caused problems even when filename had right format given by normalizing funcion. I think it's normalizer response.
  • file::normalizeFilename() uses more robust and better implementation derived from Nette Framework
    • it translates all names to URL-friendly format, the previous implementation failed eg. on czech diacritics
    • eg. "nová složka" from user's input will be saved now as "nova-slozka" (URL-friendly)

eg. "nová složka" from user's input will be saved as "nova-slozka" (URL-friendly)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant