diff --git a/scripts/drag_drop_handler.lua b/scripts/drag_drop_handler.lua index f981d3abd1..06ebeae46e 100644 --- a/scripts/drag_drop_handler.lua +++ b/scripts/drag_drop_handler.lua @@ -33,7 +33,7 @@ local ReloadUIScript = [[ if openspace.hasProperty('Modules.CefWebGui.Reload') t if is_image_file(extension) then identifier = basename_without_extension:gsub(" ", "_") - identifier = identifier:gsub(".", "_") + identifier = identifier:gsub("%p", "_") -- replace all punctuation characters with '_' return [[openspace.addScreenSpaceRenderable({ Identifier = "]] .. identifier .. [[", Type = "ScreenSpaceImageLocal",