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 Discussions (General)
 URL Issues
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

SiSL
Average Member

Turkey
671 Posts

Posted - 13 January 2009 :  13:01:03  Show Profile  Visit SiSL's Homepage  Reply with Quote
Entire examples based on finding if URL is working / well-written or not... That's not the main point actually. It would give very same error if user wrapped a wrong URL into URL tags, it still would not be valid... So I really don't understand necessity of checking if URL is right or wrong. If it is based on certain patterns, such as having a protocol etc. you replace them automatically till line ends with a break or space, if not, leave them as it is... Add url/url to start and end during post, and don't check it ever with edit_hrefs after. Current script also replaces between url tags, that's where it goes wrong, that's all..

not-a-valid-url

[url]forum.snitz.com[/url]

forum.snitz.com goes to http://forum.snitz.com/forum/forum.snitz.com which is not a valid URL at all. See that... Your auto-url recognition would leave this text as it is. Same thing... Tell me how is making it between url tags, make it any more valid-URL than your auto-recognition, which would mess-up even more for your visitors...

What's just wrong with current script is it is global replace. Case by case inspection during post just once would solve all your problems with auto-recognition. such as:

If url starts with http://(etc.etc) -> don't stop till line-break or space or [ or < (or characters or only commands you want to stop it)and wrap it between url tags.

By this way, you would simply stop double redirections on same line, by just removing edit_hrefs check after... So it does not replace globally but replaces one-by-one case...

So this will not happen:
http://www.chip.com.tr/urltest.asp?http://www.level.com.tr

But it would act like:

[url]http://www.chip.com.tr/urltest.asp?http://www.level.com.tr[/url]

By removing edit_hrefs, it would parse URL as it should...

PS: That's my final note on the subject, I'll ask you to come over and test as much as you can when I'm done with it for any cases. But please 3.4.0.7 soon! :)
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 13 January 2009 13:26:04
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 January 2009 :  14:47:48  Show Profile  Visit HuwR's Homepage  Reply with Quote
having it between tags does not make it anymore valid, i didn't say that it did, but when it is between tags you do not have to bother pattern matching random text just to see if there may or may not be a valid URL embedded in it somewhere, it is this that causes the issues because it is not possible to easily grab every possibility especially where punctuation is concerned, how do you know a dot is in the URL or denotes the end of a sentence and they just forgot the space ? at least if you insist on URL tags you know 100% for sure where a URL starts and ends.<
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07