Okay, doing just unit testing is fine. However, for the URL validation, it would be good to also have the old validation, at least for some of the protocols. Could you have it do the big regex validation for URLs that start with http, https, ftp or ftps? (I know the current regex has a different list of protocols, but that one is kind of strange.)
This regex expression works fine for URL validation. Should i submit a patch having URL validation using this regex and only for http, https, ftp and fttps ?
Well, the validation should also check that it starts with one of the allowed protocols. And doing something like "(ht|f)tps?" is clever, but maybe "too clever": it would be hard to add additional protocols to that set. By the way, this doesn't have to be one regex line - however you can get it working is good, as long as it's easily modifiable.
- Updated regex expression
You are right that trick won't be a feasible solution. I have changed the code with regex expression having option to add additional protocols. Please have a look.
You mean to say that we should check via both ways that is via regex as well as wgUrlProtocols ?
Okay, this way we will be able to check for common URLs as we are not sure whether wgURLProtocols is working correct.
Is it fine, or you wanted something else because what I got from your earlier comment was that we will use regex for checking formatting and wgUrlProtocols for checking protocols?
And sir I submitted the autoedit.php patch earlier, you haven't merged that? Was there any problem in that?
@Kamsuri5 - I thought it over, and I regret to inform you that I won't take you for this GSoC project. There are five students vying for this project, so my standards have to be very high, and unfortunately you made too many errors during the creation of this patch. (Though the PF_Autoedit.php part is correct.) I'm trying to narrow it down as quickly as possible so that the students who aren't selected will have a chance to find another project this summer - I hope you look for something else and can find another project, whether with Wikimedia or another organization. Good luck.
Alright tha's your call but actually the errors in the second patch occurred because I was not able to get from your comment that what exactly you are saying. I have contributed a lot of time to this project in past few days to have an in-depth knowledge of the same. This is my first time I am contributing to open source so maybe i was not able to understand a few things. But even after making errors I was the one who stood there to correct then. It is not that I lack in knowledge of coding. I can only request you to reconsider my work and would like to thank you for all your help and time.