do a better split that accounts for escaped .'s.
This commit is contained in:
parent
2bdcc33005
commit
aa3932f147
|
@ -20,6 +20,7 @@
|
||||||
from common import gajim
|
from common import gajim
|
||||||
import sys
|
import sys
|
||||||
import select
|
import select
|
||||||
|
import re
|
||||||
from string import split
|
from string import split
|
||||||
from common.zeroconf.zeroconf import C_BARE_NAME, C_DOMAIN
|
from common.zeroconf.zeroconf import C_BARE_NAME, C_DOMAIN
|
||||||
|
|
||||||
|
@ -114,7 +115,8 @@ class Zeroconf:
|
||||||
r'\064': '@',
|
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
|
# Replace the escaped values
|
||||||
for src, trg in escaping.items():
|
for src, trg in escaping.items():
|
||||||
|
|
Loading…
Reference in New Issue