Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Open)
 Trouble displaying FTP links
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jahmbo
Starting Member

1 Posts

Posted - 25 January 2002 :  15:13:42  Show Profile
Hi,

When I try to use ftp links that contain embedded username/password they display incorrectly as a mangled e-mail address.

ftp://username:password@somehost.com

If you follow my drift, is there a workaround for this?



Edited by - Nathan on 25 January 2002 22:46:05

Nathan
Help Moderator

USA
7664 Posts

Posted - 25 January 2002 :  22:45:38  Show Profile  Visit Nathan's Homepage
I think this it a bug, so I moved it here.

 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 25 January 2002 :  22:48:15  Show Profile
nope, not a bug. Just they way things are. There is a workaround though, I'll find it and post a link. but, you loose some of the functionality with e-mail addresses. The code that processes e-mail address looks for the @ character.
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 25 January 2002 :  22:52:34  Show Profile  Visit Nathan's Homepage
Could you put a check in to sort out the ftp:// before it is checked for the @ sign?

 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 25 January 2002 :  22:54:01  Show Profile
Here is the thread:

http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=16196

But the post where I posted the workaround was lost when the server this forum was on crashed. I e-mailed dayve to see if he still has it.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 26 January 2002 :  00:39:39  Show Profile
OK, here is what I did. (seems like it doesn't interfere with e-mail address conversions either).

all edits are in the inc_functions.asp file.

(I am using an unedited v3.3.03 inc_functions.asp file for the line numbers. If you have made any changes to the inc_functions.asp file at all, the line numbers may be different)

on line #78 change:

		if (Instr(strArray(counter), "@") > 0) and not(Instr(strArray(counter), "mailto:") > 0) and not(Instr(UCase(strArray(counter)), "[URL") > 0) then


to:

		if (Instr(strArray(counter), "@") > 0) and not(Instr(UCase(strArray(counter)), "MAILTO:") > 0) and not(Instr(UCase(strArray(counter)), "FTP:") > 0) and not(Instr(UCase(strArray(counter)), "[URL") > 0) then



on line #93 find the following section of code:

	fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
if strBadWordFilter = 1 or strBadWordFilter = "1" then
fString = ChkBadWords(fString)
end if
fString = ChkUrls(fString,"http://", 1)
fString = ChkUrls(fString,"https://", 2)
fString = ChkUrls(fString,"file:///", 3)
fString = ChkUrls(fString,"www.", 4)
fString = ChkUrls(fString,"mailto:",5)
fString = ChkMail(fString," ",5)


change it to:

	fString = " " & fString
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
if strBadWordFilter = 1 or strBadWordFilter = "1" then
fString = ChkBadWords(fString)
end if
fString = ChkUrls(fString,"http://", 1)
fString = ChkUrls(fString,"https://", 2)
fString = ChkUrls(fString,"file:///", 3)
fString = ChkUrls(fString,"www.", 4)
fString = ChkUrls(fString,"mailto:",5)
fString = ChkMail(fString," ",5)
fString = ChkUrls(fString,"ftp://", 6)



Then on line #2108 change this:

     	s_str = s_str.replace(/\b(ftp\:\/\/[\w+\.]+[\w+\.\:\/\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,


to this:

		s_str = s_str.replace(/\b(ftp\:\/\/[\w+\.]+[\w+\.\:\/\@\_\?\=\&\-\'\#\%\~\;\,\$\!\+\*]+)/gi,
Go to Top of Page

lilvegan
Starting Member

USA
33 Posts

Posted - 28 January 2002 :  10:31:22  Show Profile  Visit lilvegan's Homepage
Richard...

I was having a similar problem with @ symbols in URL's and was referred to this post. I realize this was a fix for FTP, but is there a way to make it work for general URL's. I don't mind if I lose mailto functionality.

I tried this fix as is and it still puts my URL in an email.

Thanks
Dave Little
www.dflfantasy.com

Go to Top of Page

T.G.K
Junior Member

Vietnam
347 Posts

Posted - 29 January 2002 :  00:24:41  Show Profile  Visit T.G.K's Homepage  Send T.G.K an AOL message  Send T.G.K an ICQ Message  Send T.G.K a Yahoo! Message
I tried this fix and the email do not display as a link, it like the normal text.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"A Woman without her man is nothing." (but put some punction it will be diffrent.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 30 January 2002 :  15:44:39  Show Profile
T.G.K., did you see this part of my post above?

quote:
but, you loose some of the functionality with e-mail addresses.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07