small bug with url highlighting

Kelden

small bug with url highlighting

Postby Kelden » Mon Nov 01, 2010 4:04 pm

when i have a email address in a note, e.g.
aaa.bbb@ccc.com or aaa@ccc.com
only ccc.com is highlighted
hlop4ik
Posts: 27
Joined: Sat Jun 19, 2010 8:05 pm
Contact:

Re: small bug with url highlighting

Postby hlop4ik » Mon Nov 01, 2010 7:37 pm

same bug
version 1.3

another bug:
www.qwe-rty.com - all is ok
www.Qwe-rty.com - only "rty.com" has blue color

www.qwerty.com - all is ok
www.Qwerty.com - link not detected
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: small bug with url highlighting

Postby CintaNotes Developer » Tue Nov 02, 2010 6:55 pm

Confirmed, thanks.
Registered on the roadmap: http://roadmap.cintanotes.com/feedback/ ... ectly-v13/
Alex
hlop4ik
Posts: 27
Joined: Sat Jun 19, 2010 8:05 pm
Contact:

Re: small bug with url highlighting

Postby hlop4ik » Tue Nov 02, 2010 11:48 pm

may i suggest a simple (and and may be stupid) algorithm of detecting links an e-mails in text

everything between "www." and nearest space is a link
"www.gsdfg5398yadf';[p=-0789789" is a link

and

everything between "http://" and nearest space is a link too
"http://546gfsdfgh\=45dsd48354.dsfsdf`e3" is a link

e-mail a little bit harder...
space, some symbols(not empty), "@", some symbols(not empty), ".", some symbols(not empty), space

so "8gd]\=\-@g]768.\=-=-" will be an e-mail address (not very good but simple and fast to fix a bug)
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: small bug with url highlighting

Postby CintaNotes Developer » Fri Nov 05, 2010 9:36 am

hlop4ik, thanks for trying to help!
Unfortunately your algorithm won't work correctly in the following situations:
sample text sample text (http://cintanotes.com), sample sample
sample text http://link.com, sample sample
sample cintanotes.com sample

Actually only a minor tweak to the regex is needed for emails to be highlighted correctly.
A little bit more work is needed to actually open a mail client when URL is without the "mailto:" prefix. But it is also straightforward.
So this will be fixed in the next update.
Alex

Return to “Bug Reports”