Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When you insert a url with greek characters you get a not valid url message.
Comment | File | Size | Author |
---|---|---|---|
#13 | 733640_13.patch | 1.91 KB | GiorgosK |
#10 | 733640_link_greek_characters_2.9.patch | 1.94 KB | GiorgosK |
#6 | link.module.txt | 29.39 KB | GiorgosK |
#4 | link_greek_characters.patch | 1.84 KB | GiorgosK |
Comments
Comment #1
sotiris CreditAttribution: sotiris commentedOk if we add the following at link.module @ line 29, we have greek letter validation.
Comment #2
jcfiala CreditAttribution: jcfiala commentedOh, wow! That's *just* what I needed. Thank you *so* much! I'll get that into the code this weekend.
Any chance you could throw in a couple of urls which currently fail that I could use in tests?
Comment #3
sotiris CreditAttribution: sotiris commentedYou're welcome!
Urls with greek characters:
http://mydrupal.gr/η-αμερικάνικη-κυβέρνηση-επιλέγει-drupal
http://mydrupal.gr/το-drupal-αναδείχτηκε-το-καλύτερο-php-cms-ανοικτού-κώδικα-2008
http://el.wikipedia.org/wiki/Εγκυκλοπαίδεια
http://el.wikipedia.org/wiki/Τεχνολογία
http://el.wikipedia.org/wiki/Πύλη:Υπολογιστές
Comment #4
GiorgosKHere is a patch against dev version
it seems to work but needs some more testing
Comment #5
apanag CreditAttribution: apanag commentedHello GiorgosK,
i tested your patch and the system rejected it.
Comment #6
GiorgosKI am patching in windows environment using
patch -p0 < link_greek_characters.patch --binary
tried it again it patches cleanly with no error messages
only with CRs (Stripping trailing CRs from patch.)
here is the modified module as well
Comment #7
apanag CreditAttribution: apanag commentedI used your modified module and it worked as expected.
Thank you very much.
Comment #8
GiorgosK3/3 testers confirmed this to work
Comment #9
jcfiala CreditAttribution: jcfiala commentedI'm starting to think that this method of adding allowable characters could lead to performance problems, so I'm stepping back to consider how better to allow valid unicode characters without including symbols that don't belong in urls. I welcome suggestions on how to handle this with regex!
If folks want to continue to patch their own copies of the code, they'll need to re-roll the patch because I"ve changed how the unicode characters are handled because of problems with PHP4.
Comment #10
GiorgosKNew patch for 2.9 version
@jcfiala
how about using something like this
http://www.geekology.co.za/blog/2009/03/validating-sanitizing-urls-email...
http://www.php.net/filter_var
(available from php5)
Comment #11
jcfiala CreditAttribution: jcfiala commentedHm. Problem with using filter_var is that Drupal 6.x still supports some varieties of php 4.x.
That said, it's certainly an idea for the 7.x branch.
Comment #12
dqdDear followers of this issue: please read the project page info of link module for the further way to go for URL validation issues. There is already an main issue to collect and discuss ALL possible validation scenarios in general. That's why I will mark this one here as duplicate. I need all concentration inside the ONE and only discussion to move forward. After a D7 implementation we will provide a D6 backport.
Explanation: There are too many corner cases and URL validation feature requests of users to implement them all one after the other. We would have a 40 inüut fields and checkbox lines cluttered settings form for URL validation methods only, conflicting with each other randomly. I think, the better way is to find a maybe more complex but all-embracing new configuration method, which lets the admin better decide, how and when to validate the url. Including a good description which helps to set it up. This will surely lead to a new branch
Comment #13
GiorgosKfor now I am using this patch for drupal 7 but hoping the linked issue gets implements