public static String getSafeFilename(String untrustedFilename) {
		untrustedFilename = untrustedFilename.replaceAll("[/\\\\:|]", "_").trim();
		switch (untrustedFilename) {
			case "":
				return "empty_filename";
			case ".":
				return "dot";
			case "..":
				return "dotdot";
		}
		return escapeEncode(untrustedFilename);
	}
Best-effort of sanitizing an untrusted string that will be used to create
a file on the user's local filesystem.

@param untrustedFilename filename string with possibly bad / hostile characters or sequences.
@return sanitized filename
Ghidra/Features/Base/src/main/java/ghidra/formats/gfilesystem/FSUtilities.java