Fix issue with files with special characters, use crate for generating DOM elements