URL Scan

General TRichView support forum. Please post your questions here
Post Reply
charles.lambert
Posts: 26
Joined: Mon Jul 05, 2010 7:44 pm

URL Scan

Post by charles.lambert »

When we end a sentence with an e-mail adress and a dot, the dot is taken as if it was a part of the URL.

Exemple: This is my e-mail address [email protected].

The url target is "[email protected]."

Is there a way to prevent that?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Well, I think I can improve this demo. RichViewActions already have better URL detection procedure that do not have this problem.

I'll try to make it later this week, may be already tomorrow.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Here is improved URLScan.pas unit from this demo:
http://www.trichview.com/support/files/urlscan.zip
In this version,
- it does not include a final dot in url;
- it includes a closing bracket in url only if it already contains an opening bracket of the same type.

If I remember correctly, this version of the unit requires TRichView v12.3 or newer, because it uses character constants like RVCHAR_LQUOTE. If you use older version (for example, a trial), replace these constants to the corresponding character constant.
Last edited by Sergey Tkachenko on Thu Sep 02, 2010 10:35 am, edited 2 times in total.
charles.lambert
Posts: 26
Joined: Mon Jul 05, 2010 7:44 pm

Post by charles.lambert »

Thanks Sergey!
Post Reply