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 (Closed)
 URL handling.... (+FIX)
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 20 March 2008 :  15:15:17  Show Profile  Visit MarcelG's Homepage
Symptom: when you start an URL with capital http:// it's not handled, as long as it's not preceded in the post by an URL with lower-case http:// in it...

If it's the second URL in the post, and the first one starts with lower case http:// it does work.

Example: http://forum.snitz.com/forum/topic.asp?whichpage=1&TOPIC_ID=66691#376463

I don't get it....I just discovered it when creating a SkyDrive mod for oxle....
<

portfolio - linkshrinker - oxle - twitter

Edited by - AnonJr on 17 March 2009 19:09:59

HuwR
Forum Admin

United Kingdom
20578 Posts

Posted - 20 March 2008 :  18:33:19  Show Profile  Visit HuwR's Homepage
there are lots of bugs/issues with the url parsing, which is why the .net version insists on you using proper [url] tags<
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 21 March 2008 :  01:41:53  Show Profile  Visit MarcelG's Homepage
Ok, so 'acknowledged, but ignored' is the current status?<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 21 March 2008 03:35:18
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20578 Posts

Posted - 21 March 2008 :  03:37:33  Show Profile  Visit HuwR's Homepage
evry time someone messes with the url handling it just breaks it fixes the problem but generally creates another one , however you particular issue doesn't look that dificult to fix, so will have a quick look later and see why it doesn't like it if it starts with HTTP, did you try it by putting a single space in front of the HTTP ?<
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 21 March 2008 :  03:40:04  Show Profile  Visit MarcelG's Homepage
Haven't tried that.
http://oxle.com
http://oxle.com

As you can see the single space is removed upon posting...)<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 21 March 2008 03:46:44
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20578 Posts

Posted - 21 March 2008 :  03:48:22  Show Profile  Visit HuwR's Homepage
odd, I just looked at the code, and I can't see any reason why it won't do HTTP the same as http, since the first thing the code does when checking is uppercase the string an look for HTTP, it never actuallly looks for http at all, and the regex it uses is set to ignore case so there really is no reason for it to be treated differently<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20578 Posts

Posted - 21 March 2008 :  04:17:54  Show Profile  Visit HuwR's Homepage
ok, possible fix (although all resulting HTTP become lowercase)

in the ChkURLs function in inc_func_common change the following lines

	if InStr(1,strToFormat, sPrefix) > 0 Then
		strArray = Split(strToFormat, sPrefix, -1)

to this

	if InStr(1,strToFormat, sPrefix,1) > 0 Then
		strArray = Split(strToFormat, sPrefix, -1,1)


<
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 21 March 2008 :  06:08:23  Show Profile  Visit MarcelG's Homepage
Nice fix, and I don't mind that http:// is made lowercase automatically.
The fix I fuond was this, but I'm not sure if that was correct:
In the function FormatStr I now see this:
	fString = ChkURLs(fString, "http://", 1)
	fString = ChkURLs(fString, "https://", 2)
	if VerifyWWW(fString) = True then
	fString = ChkURLs(fString, "www.", 3)
	end if
	fString = Replace(fString, CHR(133), "...")
	fString = ChkMail(fString)
	fString = ChkURLs(fString, "ftp://", 5)
	fString = ChkURLs(fString, "file:///", 6)
to this
	fString = ChkURLs(fString, "http://", 1)
	fString = ChkURLs(fString, "HTTP://", 1)
	fString = ChkURLs(fString, "https://", 2)
	if VerifyWWW(fString) = True then
	fString = ChkURLs(fString, "www.", 3)
	end if
	fString = Replace(fString, CHR(133), "...")
	fString = ChkMail(fString)
	fString = ChkURLs(fString, "ftp://", 5)
	fString = ChkURLs(fString, "file:///", 6)

When I changed this it worked...but I'm not sure what the number is for....it seems to add up, as the next one in line is 3,5, and 6...?

<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 21 March 2008 06:13:50
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20578 Posts

Posted - 21 March 2008 :  06:16:42  Show Profile  Visit HuwR's Homepage
the number is the type of url http/ftp/mail etc

for you fix to be valid, you will need to add an uppercase line for every type :) that is why it should really be done in the ChkURLs function rather than the Formatstr function, plus you end up calling the chkURLs function twicerather than just once.<
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 21 March 2008 :  06:32:13  Show Profile  Visit MarcelG's Homepage
Mmmm...makes sense indeed. Let's take your approach. <

portfolio - linkshrinker - oxle - twitter
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07