File name truncation done before conversion to HTML entities.
Merge pull request #84 from ernstchan/bugfixes

File name truncation done before conversion to HTML entities.