tlw1985 / cnpack

Automatically exported from code.google.com/p/cnpack
0 stars 0 forks source link

[PATCH] RSS feed opens incorrect URL when URL uses https protocol #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Register RSS feed that has URLs started with https://
2. Click in feed viewer to open this URL
3. Browser opens incorrect location at domain "https.com"

What is the expected output? What do you see instead?
Correctly open URL in feed

What version of the product are you using? On what operating system?
Latest trunk code

Please provide any additional information below.
Problem is in OpenURL function, it validates existence of http:// substring(it 
should look for a prefix) in URL and appends http:// prefix if not found - this 
is incorrect behavior.
(https://google.com -> http://https://google.com)

URL protocols can't be validated in this way because there can be custom URL 
protocols registered in system (like skype, email links and many more)

Also URLs with no protocol specified is completely valid URLs.
So the best solution is to remove protocol validation from OpenURL function.

Original issue reported on code.google.com by VitaliyG...@gmail.com on 14 Aug 2013 at 11:31

Attachments:

GoogleCodeExporter commented 8 years ago
OK. We'll add this prefix. Thanks.

Original comment by liuxiaos...@gmail.com on 19 Aug 2013 at 11:51

GoogleCodeExporter commented 8 years ago

Original comment by liuxiaos...@gmail.com on 20 Aug 2013 at 4:43