[#2476] [GTKUI] Fix adding mistyped trackers urls

This commit is contained in:
Calum Lind 2016-11-07 17:07:05 +00:00
parent d1daeb4cb0
commit 267d331fac
2 changed files with 2 additions and 0 deletions

View File

@ -432,6 +432,7 @@ class CreateTorrentDialog(object):
self.config['createtorrent.trackers'] = lines
log.debug('lines: %s', lines)
for l in lines:
l = l.replace('\\', '/') # Fix mistyped urls.
if is_url(l):
trackers.append(l)

View File

@ -220,6 +220,7 @@ class EditTrackersDialog(object):
b = textview.get_buffer()
lines = b.get_text(b.get_start_iter(), b.get_end_iter()).strip().split('\n')
for l in lines:
l = l.replace('\\', '/') # Fix mistyped urls.
if is_url(l):
trackers.append(l)