mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Hello,

I saw that when i double click into an URL/Link to open in the browser and inside the URL/Link contains the $chr(124) '|' character then into the Link Warning input it doesn't include the rest of the url.

Example URL: https://en.wikipedia.org/w/api.php?action=query&list=search&prop=images|info|categories&format=xml&srsearch=mirc&srnamespace=0&srprop=timestamp|snippet&srlimit=5&imlimit=1

Image: http://goo.gl/cYwjsc

- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
This is not necessarily a bug. Although the character is not explicitly marked in the RFC, it's typically recommended to encode any special characters like "|" to avoid parsing issues:

http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
https://tools.ietf.org/html/rfc3986

Specifically, in the context of IRC, it's pretty common to use characters like [] or || as boundaries to text, so you could easily have something like:

[12:00] <username> Welcome to #chan [web: http://example.org/welcome]

or

[12:00] <username> Welcome to #chan |web: http://example.org/welcome|

With this in mind, it makes sense for mIRC to ignore these non-alpha chars unless encoded. The RFC agrees with this general implementation:

Originally Posted By: RFC
A URI is composed from a limited set of characters consisting of digits, letters, and a few graphic symbols.


The "|" character is not part of those "few graphic symbols".

And if you don't like mIRC's algorithm, you can implement your own with ON HOTLINK, but note the above caveats-- yours will fail in an equal number of edge case scenarios.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard