do a better split that accounts for escaped .'s.

This commit is contained in:
James Newton 2007-11-19 15:47:17 +00:00
parent 2bdcc33005
commit aa3932f147
1 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,7 @@
from common import gajim
import sys
import select
import re
from string import split
from common.zeroconf.zeroconf import C_BARE_NAME, C_DOMAIN
@ -114,7 +115,8 @@ class Zeroconf:
r'\064': '@',
}
name, stype, protocol, domain, dummy = split(fullname, '.')
# Split on '.' but do not split on '\.'
name, stype, protocol, domain, dummy = re.split('(?<!\\\\)\.', fullname)
# Replace the escaped values
for src, trg in escaping.items():