pub fn safe_directory_identifier(identifier: &str) -> StringExpand description
Normalizes a user-supplied identifier for use in directory paths.
Replaces // with / and filters out empty segments and .. to prevent path traversal.
Backslashes are normalized first so Windows separators cannot bypass the filter.