When I was writing the puncuation bugfix, I noticed something about the ChkURLs function... might be some un-needed code, I dont know cuz I dont really understand the purpose of thise. But look...
if ((strArray(Counter-1) = "" Or Len(strArray(Counter-1)) < 5) And strArray(Counter)<> "") then
ChkURLs = ChkURLs & edit_hrefs(sPrefix & strArray(Counter), iType)
elseif ((UCase(Right(strArray(Counter-1), 6)) <> "HREF=""") and _
(UCase(Right(strArray(Counter-1), 5)) <> "[IMG]") and _
(UCase(Right(strArray(Counter-1), 5)) <> "[URL]") and _
(UCase(Right(strArray(Counter-1), 6)) <> "[URL=""") and _
(UCase(Right(strArray(Counter-1), 6)) <> "ftp://") and _
(UCase(Right(strArray(Counter-1), 8)) <> "file:///") and _
(UCase(Right(strArray(Counter-1), 7)) <> "http://") and _
(UCase(Right(strArray(Counter-1), 8)) <> "https://") and _
(UCase(Right(strArray(Counter-1), 5)) <> "SRC=""") and _
(UCase(Right(strArray(Counter-1), 1)) <> "-") and _
(UCase(Right(strArray(Counter-1), 1)) <> "=") and _
(strArray(Counter) <> "")) then
ChkURLs = ChkURLs & edit_hrefs(sPrefix & strArray(Counter), iType)
else
blahblahblah
Couldnt the code in green be combined seeing how the code in red is the same result either way?
End result being:
if ((strArray(Counter-1) = "" Or Len(strArray(Counter-1)) < 5) And strArray(Counter)<> "") or _
((UCase(Right(strArray(Counter-1), 6)) <> "HREF=""") and _
(UCase(Right(strArray(Counter-1), 5)) <> "[IMG]") and _
(UCase(Right(strArray(Counter-1), 5)) <> "[URL]") and _
(UCase(Right(strArray(Counter-1), 6)) <> "[URL=""") and _
(UCase(Right(strArray(Counter-1), 6)) <> "ftp://") and _
(UCase(Right(strArray(Counter-1), 8)) <> "file:///") and _
(UCase(Right(strArray(Counter-1), 7)) <> "http://") and _
(UCase(Right(strArray(Counter-1), 8)) <> "https://") and _
(UCase(Right(strArray(Counter-1), 5)) <> "SRC=""") and _
(UCase(Right(strArray(Counter-1), 1)) <> "-") and _
(UCase(Right(strArray(Counter-1), 1)) <> "=") and _
(strArray(Counter) <> "")) then