X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..063d22a8861972ce34ac079d0b2a1fb7d7156966:/src/funding/utils.py?ds=sidebyside diff --git a/src/funding/utils.py b/src/funding/utils.py index c16c9d93d..77d8981f5 100644 --- a/src/funding/utils.py +++ b/src/funding/utils.py @@ -18,9 +18,11 @@ sane_in_payu_title = re.escape( "".join(set(string.punctuation) - set('\\')) ) + def replace_char(m): char = m.group() return char_map.get(char, '') + def sanitize_payment_title(value): - return re.sub('[^%s]{1}' % sane_in_payu_title, replace_char, unicode(value)) + return re.sub('[^%s]' % sane_in_payu_title, replace_char, unicode(value))