we completely agree: in case of invalid url, not having a warning is more a problem than rendering the url instead of the text
as I see it, rendering the url was one form of warning, since rendering the text is a lot less visible
Does this really mean if my URL is http://sdfasf/wow.html or ftp://sdfsdf/super.html a /index.html is added?
once again, don't ask but write a unit test to show what is curently the effective result, even if you don't understand why this was done like this
if there is no explanation in code, I don't have it myself either
And I know I refactored code a good number of years ago for this method, then perhaps you're asking because svn annotate tells I wrote the code, but IIRC, at that time, I was refactoring to make algorithms easier to understand, but my first objective was to not change any result, even if I didn't understand some choices on semantics