Community
Wiki Posts
Search

Slight bug in URL parsing

Thread Tools
 
Search this Thread
 
Old Jan 3, 2007 | 11:52 am
  #1  
Original Poster
A FlyerTalk Posting Legend
20 Countries Visited
2M
50 Countries Visited
20 Years on Site
 
Join Date: Apr 2004
Location: GVA (Greater Vancouver Area)
Programs: D.R.E.A.D. Gold card holder
Posts: 53,184
Slight bug in URL parsing

The URL auto parser (the one that takes URLs and automatically puts them inside a [.url][/.url] pair) does not behave correctly with parenthesis.

Example: enter the following in a post:
Code:
See this link (http://www.united.com/page/article/0,6722,51366,00.html)
and you will see the generated [.url][/.url] pair will have the right parenthesis inside the tag, i.e. See this link ([.url]http://www.united.com/page/article/0,6722,51366,00.html)[/.url]

(Note: I use .url in this post to prevent the parser from actually interpreting the url tags).
mahasamatman is offline  
Old Jan 3, 2007 | 1:42 pm
  #2  
Tim at WebFlyer
Guest
 
Posts: n/a
I believe that the ')' character is a valid character that can be part of a url string and that this is not quite a bug as there are cases were a valid url could contain/end with a ')' in it, it would break those urls with auto-parse if it didn't include it. I think the best solution now is to have white space (spaces or returns) before and after urls that are left to auto parse or manually entering/using the link tool for applications of a url like this.
 
Old Jan 3, 2007 | 5:54 pm
  #3  
Original Poster
A FlyerTalk Posting Legend
20 Countries Visited
2M
50 Countries Visited
20 Years on Site
 
Join Date: Apr 2004
Location: GVA (Greater Vancouver Area)
Programs: D.R.E.A.D. Gold card holder
Posts: 53,184
Originally Posted by Tim at WebFlyer
I believe that the ')' character is a valid character that can be part of a url string and that this is not quite a bug as there are cases were a valid url could contain/end with a ')' in it, it would break those urls with auto-parse if it didn't include it. I think the best solution now is to have white space (spaces or returns) before and after urls that are left to auto parse or manually entering/using the link tool for applications of a url like this.
Any non-whitespace character is valid in a URL, so that argument doesn't hold water. The auto-parser works with URLs followed by most other punctuation (periods, commas, exclamation points), which are all not only definitely valid, but very common in URLs. Since the 99.9999% use case for a right parenthesis is to set off a URL, the 0.0001% case of actually wanting to include one in a URL should be the one that people have to handle specially.
mahasamatman is offline  
Old Jan 4, 2007 | 9:52 am
  #4  
Tim at WebFlyer
Guest
 
Posts: n/a
Originally Posted by mahasamatman
Any non-whitespace character is valid in a URL, so that argument doesn't hold water. The auto-parser works with URLs followed by most other punctuation (periods, commas, exclamation points), which are all not only definitely valid, but very common in URLs. Since the 99.9999% use case for a right parenthesis is to set off a URL, the 0.0001% case of actually wanting to include one in a URL should be the one that people have to handle specially.
I'll see we can do...

edit, testing:
(http://www.united.com/page/article/0,6722,51366,00.html)

Last edited by Tim at WebFlyer; Jan 4, 2007 at 11:14 am Reason: testing
 
Old Jan 4, 2007 | 11:15 am
  #5  
Tim at WebFlyer
Guest
 
Posts: n/a
mahasamatman, can you link to me where this is happening? Now that I test this behavior I'm not seeing it myself... thanks,
 
Old Jan 4, 2007 | 7:58 pm
  #6  
Original Poster
A FlyerTalk Posting Legend
20 Countries Visited
2M
50 Countries Visited
20 Years on Site
 
Join Date: Apr 2004
Location: GVA (Greater Vancouver Area)
Programs: D.R.E.A.D. Gold card holder
Posts: 53,184
Originally Posted by Tim at WebFlyer
mahasamatman, can you link to me where this is happening? Now that I test this behavior I'm not seeing it myself... thanks,
Well, I've manually corrected the posts where I had it, but it happens every time I try (such as this one: http://www.united.com/page/article/0...51366,00.html).
mahasamatman is offline  
Old Jan 5, 2007 | 9:29 am
  #7  
Tim at WebFlyer
Guest
 
Posts: n/a
Originally Posted by mahasamatman
Well, I've manually corrected the posts where I had it, but it happens every time I try (such as this one: http://www.united.com/page/article/0...51366,00.html).
Let me try again, each time I have tested it, it has not included the right parenthesis:

(http://www.united.com/page/article/0,6722,51366,00.html)

That worked let me try another:

(http://www.united.com/page/article/0,6722,51366,00.html).

That worked, another try:

(such as this one: http://www.united.com/page/article/0...51366,00.html).

Ok, I think I see what the condition is that causes this. Thanks,
 


Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.