I just played with this in python-apt:
>>> import apt_pkg >>> s="http://user2:p%40s%2Fs%3Aword@localhost:3128" >>> apt_pkg.DeQuoteString(apt_pkg.QuoteString(s, '="\n')) 'http://user2:p@s/s:word@localhost:3128' >>> apt_pkg.DeQuoteString(apt_pkg.QuoteString(s, '="\n%')) 'http://user2:p%40s%2Fs%3Aword@localhost:3128' >>> apt_pkg.DeQuoteString(apt_pkg.QuoteString(s, '="\n%')) == s True
And I think it may fix the problem.
I just played with this in python-apt:
>>> import apt_pkg user2:p% 40s%2Fs% 3Aword@ localhost: 3128" DeQuoteString( apt_pkg. QuoteString( s, '="\n')) user2:p@ s/s:word@ localhost: 3128' DeQuoteString( apt_pkg. QuoteString( s, '="\n%')) user2:p% 40s%2Fs% 3Aword@ localhost: 3128' DeQuoteString( apt_pkg. QuoteString( s, '="\n%')) == s
>>> s="http://
>>> apt_pkg.
'http://
>>> apt_pkg.
'http://
>>> apt_pkg.
True
And I think it may fix the problem.