ludovicchabant/PieCrust — pull request #77 by olegcherr (2013-03-17 18:27:12+00:00)
Title: Slugify fixes for #74

Changes:

1. ```rawurlencode``` has been moved to the bottom of ```slugify```.
Encoding works stupidly if it goes before ```dash```-things:
```Тест``` -> ```%D0%A2%D0%B5%D1%81%D1%82``` -> ```-D0-A2-D0-B5-D1-81-D1-82```

2. Now ```strtolower``` goes right before ```rawurlencode```.
Because ```strtolower``` makes no sense after the string was encoded:
```%D0%A2%D0%B5%D1%81%D1%82``` -> ```%d0%a2%d0%b5%d1%81%d1%82```
Oh, Ludovic, that is so obvious...

3. ```res2dash```-hack is no longer needed.
That's how it works now:
- If ```dash``` not set, only reserved symbols will be replaced with dashes.
- Otherwise, all non-latin symbols will be replaced.

.
4. The creation of folders has been fixed.
Combination ```res2dash|encode``` had been causing this:
![folders](https://f.cloud.github.com/assets/3730074/268426/d8abf2f0-8f2e-11e2-8605-92eecd2145f1.jpg)

.
5. Logging has been fixed too:
![log](https://f.cloud.github.com/assets/3730074/268430/09c2ae7e-8f2f-11e2-9fa5-d8eadf6c383a.jpg)
Now all shows Ok.

I hope you'll merge this request as soon as it possible.