Fix page names that contain dot
authorPrashant Karmakar <webster15july@gmail.com>
Tue, 1 Nov 2016 13:18:24 +0000 (18:48 +0530)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 1 Nov 2016 13:18:24 +0000 (14:18 +0100)
commit186db7cd7ad56051d5a064ee5120e6ec73f575a0
tree58ccdae205c55af5a01be7f87a9a5ce1a27051b9
parentcda3b36fe2c1fd708fe5c9b9388c3880004bd1c6
Fix page names that contain dot

changes:
    - in hugolib/page.go, `func permalink` and `func TargetPath`
      Fixed the attempt to *replace* the extension of something
      that was *already* a basename.
    - in source/file.go, `func NewFile`
      added check for allowed languages before translating filename

Fixes #2555
hugolib/page.go
source/file.go