strip leading underscores in cname

This commit is contained in:
Matthew Scragg 2015-12-08 17:16:33 -06:00
父節點 e3508e365f
當前提交 d24d8720db
共有 1 個文件被更改,包括 1 次插入0 次删除

查看文件

@ -94,6 +94,7 @@ def to_canonical(s):
s = s.encode('utf8')
s = str(s)
s = s.strip()
s = s.lstrip('_')
s = re.sub(r"\s", "-", s)
s = re.sub(r"[" + re.escape(reserved_chars) + "]", "", s)
s = re.sub(r"[" + re.escape(unsafe_chars) + "]", "", s)