Author |
Message |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Sun Mar 03, 2013 12:18 pm |
|
I have a issue with specialchars in the shortlinks of the usernames. It's possible to add in RN25+ usernames with specialchars without any filterings.
the known result:
userinfo-neralex.html
but if i'm adding/changing now a user like this: "töäüst", then i get the following result:
userinfo-t.htmlöäüst
Any ideas to solve this one or is it better to create a filter/check while the registration or while adding users with the admin area of Your_Account? |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Sun Mar 03, 2013 6:39 pm |
|
That looks like a broken match pattern in ShortLinks, so I think it would be possible to figure out a solution...
The pattern used for that URL:
([a-zA-Z0-9_-]*)
Will only work for English A-Z, a-z, 0-9. You will need to change it to match unicode characters, in both .htaccess and GT_Your_Account... Assuming shortlinks itself is compatible.
I know \b\p{L}+\b will match an entire word of Unicode characters, but you'll have to play with it to see what works; as I have no easy way to test it ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Mon Mar 04, 2013 5:58 am |
|
Whatever is supported by the preg_match() function in your environment should work with ShortLinks. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 05, 2013 5:44 am |
|
Thanks guys, but to me there is missing a few more examples or links with solutions. Expressions are not my best skill. It will not work. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 05, 2013 7:41 am |
|
I played with this some and got your example to shorten correctly, but having issues with the url working correctly when clicked (not found).
The requested URL /userinfo-töäüst.html was not found on this server.
The pattern I used was not too elegant, but seemed to work outside of the server not understanding the URL
([a-zA-Z0-9\-\_\Ä\ä\Ö\ö\Ü\ü]*)
Maybe your server environment will have better luck? At least it's something else to try.. The problem only seems to happen with shortlinks enabled, as the long url functions ok (at least in my test environment)...
modules.php ? name=Your_Account&op=userinfo&username=töäüst
(which makes me think the problem may lay in apache/modrewrite and how these characters are handled) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 05, 2013 8:47 am |
|
Thanks. I have it replaced in the tap file of my module and in the apache rule isnide the .htaccess file. It works for one module but if i have activated the AutoTapLinks in the rnconfig.php, then i get the same issue page wide. I have changed for testing the tap file from Your_Account too but it was ignored. I will give up, because here comes more problems. All links with this username creating now validation issues and i think here is a lot of work to do, to get clear usernames with specialschars. Maybe is it a new point on the to-do list for upcoming RN versions. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 05, 2013 7:56 pm |
|
neralex, AutoTapLinks being on will require you to make the change in ALL the GT-*.php files where this username needs to be rewritten. That link could be quite prevalent amongst many of the modules. You will need to find them all to ensure all our tapped correctly.
Glad to hear you go the .htaccess part working fine. Not sure why spasticdonkey's didn't. Probably some kind of Apache configuration setting issue, but I wouldn't have a clue which one. I have not been looking forward to tackling "tapping" in a true UTF-8 environment which is why I have been pushing for a Link Factory approach instead for the new CMS - but it would require a ton of core code changes in each module to use the new API. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Mar 05, 2013 8:29 pm |
|
Looks like the up-front configuration of mod rewrite in .htaccess may need to look something like this:
Code:
AddDefaultCharset UTF-8
RewriteEngine on
RewriteBase /
|
You don't have to have the last directive, but I just always do. I think that default char set may be needed or help????? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Mar 06, 2013 9:11 am |
|
I played some more with it, with no positive results. Having trouble determining if my local testing site has PHP compiled with PCRE UTF-8 support... Which is required for look-ahead assertions like \b\p{L}+\b
I don't find mention in my php.ini or phpinfo() that it is "Compiled with UTF-8 support" but not sure I'm looking in the right places.
Looking forward to a "link factory" more and more ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|