summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/Plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal/Plugin.py')
-rw-r--r--module/plugins/internal/Plugin.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index b0c0bb66e..fd8712b44 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -7,6 +7,7 @@ import inspect
import os
import re
import urllib
+import unicodedata
if os.name != "nt":
import grp
@@ -51,6 +52,15 @@ def fixurl(url):
return html_unescape(urllib.unquote(url.decode('unicode-escape'))).strip().rstrip('/')
+def fixname(m):
+ m = unicodedata.normalize('NFKD', m)
+ output = ''
+ for c in m:
+ if not unicodedata.combining(c):
+ output += c
+ return output
+
+
#@TODO: Move to utils in 0.4.10
def timestamp():
return int(time.time() * 1000)