fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stabilize dependencies.
[wolnelektury.git]
/
src
/
funding
/
utils.py
diff --git
a/src/funding/utils.py
b/src/funding/utils.py
index
c16c9d9
..
5808336
100644
(file)
--- a/
src/funding/utils.py
+++ b/
src/funding/utils.py
@@
-4,7
+4,7
@@
#
import re
import string
#
import re
import string
-from fnpdjango.utils.text
.slughifi
import char_map
+from fnpdjango.utils.text import char_map
# PayU chokes on non-Polish diacritics.
# Punctuation is handled correctly and escaped as needed,
# PayU chokes on non-Polish diacritics.
# Punctuation is handled correctly and escaped as needed,
@@
-18,9
+18,11
@@
sane_in_payu_title = re.escape(
"".join(set(string.punctuation) - set('\\'))
)
"".join(set(string.punctuation) - set('\\'))
)
+
def replace_char(m):
char = m.group()
return char_map.get(char, '')
def replace_char(m):
char = m.group()
return char_map.get(char, '')
+
def sanitize_payment_title(value):
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))