Skip to content

Commit 39a2e40

Browse files
committed
Escape Quotations (#96)
1 parent 5c81dbe commit 39a2e40

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/template.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ pub fn build_template(location: Option<PathBuf>) {
247247

248248
let mod_id = format!(
249249
"{}.{}",
250-
final_developer.to_lowercase().replace(' ', "_"),
251-
final_name.to_lowercase().replace(' ', "_")
250+
final_developer.to_lowercase().replace(' ', "_").replace("\"", ""),
251+
final_name.to_lowercase().replace(' ', "_").replace("\"", "")
252252
);
253253

254254
let action = ask_confirm("Do you want to add the cross-platform Github action?", true);
@@ -262,11 +262,11 @@ pub fn build_template(location: Option<PathBuf>) {
262262
create_template(CreateTemplate {
263263
template,
264264
project_location: final_location,
265-
name: final_name,
265+
name: final_name.replace("\"", "\\\""),
266266
version: final_version,
267267
id: mod_id,
268-
developer: final_developer,
269-
description: final_description,
268+
developer: final_developer.replace("\"", "\\\""),
269+
description: final_description.replace("\"", "\\\""),
270270
strip,
271271
action,
272272
});

0 commit comments

Comments
 (0)