Prevent invalid html characters in themes name

This commit is contained in:
Guillaume Gomez 2019-06-30 19:09:58 +02:00
parent d350008c88
commit e365120243

View File

@ -569,7 +569,9 @@ fn write_shared(
let content = try_err!(fs::read(&entry), &entry);
let theme = try_none!(try_none!(entry.file_stem(), &entry).to_str(), &entry);
let extension = try_none!(try_none!(entry.extension(), &entry).to_str(), &entry);
cx.shared.fs.write(cx.path(&format!("{}.{}", theme, extension)), content.as_slice())?;
cx.shared.fs.write(
cx.path(&format!("{}.{}", Escape(theme), extension)),
content.as_slice())?;
themes.insert(theme.to_owned());
}