Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How'd they hyperlink the URL we type inside Message box in Tek-Tips ? 1

Status
Not open for further replies.

Deadline

Programmer
Feb 28, 2001
367
0
0
US
Hello,

When I type an URL in any of my message, after posting it, I could see it being Hyperlinked(that is, <A></A> tags added to it.)

I want to mimic the same in ASP. These are certain points to note.

* The length of URL is not known beforehand.
* Where the URL occurs is also not known.
* It might contain several special characters like # % & @ $ etc.
* It begins with http://


Based on the above conditions, how'd I identify a URL in a message and Hyperlink it ?

Can you help me please ? Thank you...
RR

 
Hi Tony, Did you miss out something ? Thank you...
RR

 
I would guess that the BB's that do change the URL to an actual link searches for either HTTP or www. and then goes from there to the first space found and puts that into the anchor tags.

HTH

Mike
 
Hi Mike,
Thanks for the response, but apart from blank space there is possibility of any of the following characters comma, hyphen, semi-colon, colon etc. How to handle this ? Thank you...
RR

 
Sorry, this thread is kind of old now...but I just saw a thread I was in had another response, so sorry again for bringing this back..

To try to answer your question a little bit though Deadline...the BB's that I frequent, they don't catch characters such as those at the end of a URL.

If you enter it will include the last &quot;.&quot; and link an incorrect URL.

Mike
 
Ok, so I guess this BB does check that. In that case, I dunno, maybe find the space...then check the character before it, and if it's an invalid character, omit it in the anchor tag that would be generated.

Of course, since this is so old, you may have already solved your problem.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top