Hi,
as in Germany ä, ö, ü, are allowed in URLS canonical URL doesnt allow these URLS. In one of the earlier Nodewords versions (i think 6.x.1.2 ) it did work. Thats why I was able to enter the right URLs and now with nodewords 6.x.1.8 it tells me that these urls are not right and I cannot safe the article before I change it...
Thanks

CommentFileSizeAuthor
#2 screensh.jpg14.22 KBchris_bbg888

Comments

avpaderno’s picture

Status: Active » Closed (works as designed)

As reported in the form field description use a relative URL without the initial slash; a relative URL doesn't start with a domain, and that is why the canonical URL is not being accepted.

chris_bbg888’s picture

StatusFileSize
new14.22 KB

Thanks kiamlaluno,
I attached you a screenshot. I get this error: "Die Canonical URL muss eine relative URL sein.". Which basically means the URL must be relative, whicht it is. And its without the initial /.
So I guess its the Ü, because it let me save the node if I write the url without ü.

Many thanks

avpaderno’s picture

Title: canonical URL not allowing äöü in the domain » Canonical URL does not allow to use äöü
Status: Closed (works as designed) » Active

I am changing the title as it is not true that canonical URL doesn't accept such characters in the domain; the path of a URL is not part of the domain name.

avpaderno’s picture

The function used to validate the canonical URL is validate_url(), which should verify also a relative URL (when the last parameter is set to FALSE). I have to understand if it is the regular expression that the function uses that is not correct, or if the function is not thought to validate relative URLs (even if from the documentation I would understand it should).

FYI, the regular expression used from the function for relative URLs is /^(?:[\w#!:\.\?\+=&@$'~*,;\/\(\)\[\]\-]|%[0-9a-f]{2})+$/i>/code>.

avpaderno’s picture

As pointed out from beeradb on IRC, the URL must be encoded, before to pass it to valid_url(); this is because the accented letters (and over letters) are encoded when they are used in a URL.

The validation function needs to first pass the relative URL to drupal_urlencode(), and pass the result to valid_url().

Many thanks to beeradb for pointing out this.

avpaderno’s picture

Status: Active » Fixed

I changed the code as I reported in my previous comment. The code has been committed in CVS for the development snapshot.

Thanks for the report; I apologize for not having understood what you meant.

chris_bbg888’s picture

kiamlaluno you're very welcome. thanks for your effort, your really fast and I appreciate your work very much.
I'm just a beginner, not always knowing how to describe it right. so the result for me is that I wait for the next version and then its fixed? is that right?
is it a problem that i save a canonical URL now as sicherheit/verschl%2526uuml%3Bsselung instead of sicherheit/verschlüsselung?
is it for a search engine the same? many thanks

avpaderno’s picture

Browsers are supposed to encode all the particular characters, which includes the space.
There is no problem, if you manually replace those characters with the encoded value; if you prefer to wait an official release of the module, then that is what you can do waiting for it.

hass’s picture

Drupal does not support German Sonderzeichen in URLs. You should use path auto with i18n.txt to convert "ü" to "ue" and so on. Drupal also does not support IDN hostnames yet. There are several known issues! Don't try to implement your own way, please. This need to get this solved in Drupal core first... see http://drupal.org/project/issues?text=idn&projects=&status=Open&prioriti... for the related issues.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.