@@ -0,0 +1,771 @@
+#!/usr/bin/env python%0A%0A#%0A# file: common.py%0A#%0A# author: Copyright (C) 2017-2018 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info%0A#%0A# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not%0A# distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.%0A#%0A%0Aimport re%0A%0A#%0A# Sanitizes provided string%0A#%0A# param %5Bin%5D string is the string that will be sanitized%0A# param %5Bin%5D pattern is the pattern which will be replaced, default - '%5B%5E0-9A-Za-z-%5D'%0A# param %5Bin%5D replacement is the replacement string, default - '_'%0A#%0A# return sanitized string%0A#%0A%0Adef sanitize(string, pattern = '%5B%5E0-9A-Za-z-%5D', replacement = '_'):%0A%09regex = re.compile(pattern)%0A%09return regex.sub(replacement, string)%0A

Add common.py with sanitize()