Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
filter.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2009 at 08:34 UTC
Updated:
4 Jul 2020 at 21:49 UTC
Jump to comment: Most recent
Comments
Comment #1
Drave Robber commentedIndeed:
This has nothing to do with comment.module however, but everything with filter of which input formats consist. (this would happen on node body, too)
Related issue (it seems
!also breaks it): #1610342: Some API links are not converted into proper linksComment #2
Sepero commentedThis and a few other bugs (1, 2) appear to be a result of filter.module trying to be too smart.
All this stuff for what is url accepted is overkill: [a-zA-Z0-9@:%_+*~#?&=.,/;-]*[a-zA-Z0-9@:%_+*~#&=/;-]))([.,?!]*?)
I've just now looked into the D7 code for this and it still does not recognize foreign characters. Why try to be so smart and accidentally restrict valid things? Perhaps instead - identify what should be recognized as knowlingly invalid, and use a much simpler non-greedy Negation type of regex. For example, allow every type character except: \)\<\s and perhaps a few others, and stop before exceptions like if it ends with a period or comma followed by whitespace
Comment #3
Sepero commentedHere's a fix. Go into modules/filter/filter.module and replace the function _filter_url with this:
It fixes all these open bugs:
https://drupal.org/node/550464
https://drupal.org/node/2016089
https://drupal.org/node/1899246
https://drupal.org/node/1480992
https://drupal.org/node/1055864
It also fixes unknown/unmarked bugs:
Can't use foreign characters in email addresses.
Can't use many valid characters like '$%' in email addresses.
Can't preceed www web addresses with an html break.
Many html codes can't be used to end a url or email link.
Comment #4
hanno commentedSee also this patch for D8 #1657886: Filter "Convert URLs into links" doesn't support multilingual web addresses, can be backported.
Comment #6
avpaderno