rakslice / orion

Twitch Client using QT
GNU General Public License v3.0
1 stars 0 forks source link

URL detection has some problems #16

Closed rakslice closed 5 years ago

rakslice commented 5 years ago

The detection of URLs in chat to show them as links doesn't work sometimes. e.g.

not working

https://img.purch.com/rc/600x450/aHR0cDovL21lZGlhLmJlc3RvZm1pY3JvLmNvbS9JLzIvNDQyNTg2L29yaWdpbmFsLzI4LmpwZw==

working

https://www.extremetech.com/wp-content/uploads/2012/09/lian-li-train-pc-case-640x353.jpg

rakslice commented 5 years ago

The regex used for detecting URLs was missing most of the reserved characters (https://tools.ietf.org/html/rfc3986#section-2.2) and a bunch of safe ones even. What dumpster did they pull that old regex out of?

rakslice commented 5 years ago

Fixed in c86ac1e9ac7543edf3424ad2613e327273605f77