Login Register


What text recognition should I support? filter_list
Author
Message
What text recognition should I support? #1
When a user enters a new message into the chat, I want links to be clickable, and also anything that reads "youtubeConfusedmosh" or "twitter:jack" or "instagram:kim" I want to be a link.
I know how to support the above two. Yeah, I got that.

BEfore I program this huge monster for supporting those two, what else should I support? I really can't think of anything.
I Mean. i already have @mentions to other posts, and to other _users as well.
I'm trying to think of what else... I don't think there is anything.

great. this is going to be adhoc as fuck.


what other http:// , https:// protocols are there? I mean... people don't usually use other protocols when hyper linking.

Reply

RE: What text recognition should I support? #2
What language are you doing this in? And it sounds like all you would need is three different regex expressions and some simple string building.

Reply

RE: What text recognition should I support? #3
(05-16-2016, 05:01 PM)NoahWatchmaker Wrote: what other http:// , https:// protocols are there? I mean... people don't usually use other protocols when hyper linking.

You really don't have to worry about wrappers other than those. However, it's important to create a white-list or something of the sort, you don't want this happening - https://www.bishopfox.com/blog/2016/04/i...sage-data/

[+] 1 user Likes meow's post
Reply

RE: What text recognition should I support? #4
not entirely sure what you're getting at here, but if you're asking how to support it, use regex and replace with <a> tags with the link inside. As for other protocols, there's git://, ftp://, and sftp://. Probably more, but those are the only one's I've seen used.
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: What text recognition should I support? #5
Those "protocols" are defined within the Windows registry for Windows users, things like torrent links, irc links are all created by program installations. They aren't truly really protocols as much as they are "mappings", but if this is what you're trying to do from your program, you should just use regex. There's nothing here that regex can't achieve.

Reply

RE: What text recognition should I support? #6
Basically what 0xDEAD10CC said. Presuming this is a web application, it would be trivial to use a bit of JavaScript to convert these "pseudo-links" into actual URLs to services, e.g. http://twitter.com/{0}. Regex, or if you're lazy, indexOf() and split(), then switch(), will do the job.

Reply

RE: What text recognition should I support? #7
(06-21-2016, 11:56 PM)Axari Wrote: Basically what 0xDEAD10CC said. Presuming this is a web application, it would be trivial to use a bit of JavaScript to convert these "pseudo-links" into actual URLs to services, e.g. http://twitter.com/{0}. Regex, or if you're lazy, indexOf() and split(), then switch(), will do the job.

Yeah. i'll have to learn regex. what a drag.

Reply

RE: What text recognition should I support? #8
(06-22-2016, 05:03 AM)NoahWatchmaker Wrote:
(06-21-2016, 11:56 PM)Axari Wrote: Basically what 0xDEAD10CC said. Presuming this is a web application, it would be trivial to use a bit of JavaScript to convert these "pseudo-links" into actual URLs to services, e.g. http://twitter.com/{0}. Regex, or if you're lazy, indexOf() and split(), then switch(), will do the job.

Yeah. i'll have to learn regex. what a drag.

Hey now, Regex is a very good skill to have. Besides, if you really wanted to resist, my way would also work.

Reply







Users browsing this thread: 1 Guest(s)