From 5bba249c8799679767e015a8606b3f0757d79481 Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Tue, 8 Oct 2024 18:38:25 +0300 Subject: [PATCH] Provide sanitized version of output filename --- dangerzone/document.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dangerzone/document.py b/dangerzone/document.py index 0b3e3f4..8af46f0 100644 --- a/dangerzone/document.py +++ b/dangerzone/document.py @@ -123,6 +123,10 @@ class Document: self.validate_output_filename(filename) self._output_filename = filename + @property + def sanitized_output_filename(self) -> str: + return util.replace_control_chars(self.output_filename) + @property def suffix(self) -> str: return self._suffix