Letters with tildes produce empty links

com2 - October 10, 2008 - 12:44
Project:freelinking
Version:6.x-1.7
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

When I do [[Proyecto Escolar Valnalón]] the filter produces <a href="/freelinking/Proyecto%2520Escolar%2520Valnal%2526oacute%253Bn"></a>, making an invisible empty link.

#1

com2 - December 1, 2008 - 16:42

bump

#2

eafarris - December 1, 2008 - 17:12

I can reproduce this and understand what's happening, but I can't get a regular expression working for this. Any help is appreciated.

#3

manolooo - December 13, 2008 - 16:00

I'm having the same issue, I've checked it happens with à,á,è,é,ì,í,ò,ó,ñ and ç and also with same letters in capital, it seems it also happens with â and ö. This is a drama for not English languages.

I'm using drupal on ubuntu 8.04, and my client machine is windows xp.

#4

eafarris - December 17, 2008 - 20:08
Status:active» fixed

This appears to be working by setting the regular expressions to be UTF-8 aware.

Fixed in freelinking-6.x-1.7. Please verify and close.

#5

manolooo - December 17, 2008 - 22:11

Thank you for your fast reply, I changed de frelinking, module and still having the same problem, the probelm is that i don't know what do you mean by "setting the regular expressions to be UTF-8 aware", where and how do you do this? is this another module?

I'm sorry for my ignorance and wish to thank you again for your help.

#6

eafarris - December 18, 2008 - 02:18

When I copy your example ([[Proyecto Escolar Valnalón]]) into a node it works perfectly for me: the text is converted into a freelink, and clicking on the link takes me to a node creation page with the title filled in and accented properly.

The regular expressions are UTF-8 aware as the result of adding a "u" at the end of the regular expression, as per http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php. See the freelinking.module source code line 454:

<?php
$freelinkingregexp
= '/[^!](\[\[.+]])/Uu'; // this finds [[links like this]], un-greedily and utf-8
?>

Do you have a working mbstring extension for PHP? See admin/reports/status, Unicode library.

#7

manolooo - December 19, 2008 - 08:26

Not working yet.

admin/reports/status has a green ok mark on PHP mbstring extension, line 454 is exactly as you state and module version is 6.x-1.7, don't know where else to search.

#8

System Message - January 2, 2009 - 08:30
Status:fixed» closed

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

#9

manolooo - January 19, 2009 - 16:45
Status:closed» postponed (maintainer needs more info)

Sorry for reopening this issue but I'm getting more and more confused about it. I installed in the same computer a drupal distribution called wiki, which is drupal version 5 and it's not having any problem at recognising accents, even more curious, i edited this distribution's freelinking module and it does not have that little u at the end of $freelinkingregexp while the drupal 6.x freelinking module does, so it doesn't seem to have nothing to do with it, (anyway it's drupal 5.x instead of drupal 6.x).

I've edited php.ini and put these two lines
mbstring.language = Neutral; Set default language to Neutral(UTF-8) (default)
mbstring.http_input = auto

I'm completely stuck with this issue.

#10

manolooo - January 20, 2009 - 18:46
Priority:critical» normal

#11

manolooo - January 20, 2009 - 18:47
Version:6.x-1.x-dev» 6.x-1.7

#12

manolooo - January 21, 2009 - 00:00

I finnally found some explanation but not solved yet: if I disconnect FCK editor then I have no problem with accents. FCKeditor automatically converts í to '&'iacute; ò to '&'ograve; etc and it seems freelinking doesn't interpret them as í or ò.In fact it doesn't know what to do and the link disapears.

Would it be possible that freelinking understands html coding or to disable these charcters conversion in FCKeditor?

Thank you.

#13

manolooo - January 21, 2009 - 00:42

I think I found the solution: you have to go to Administer :: Site configuration :: Edit FCKeditor profile and then in advanced options put this:

FCKConfig.IncludeLatinEntities = false ;

it seems to be working!

#14

manolooo - January 21, 2009 - 10:24
Status:postponed (maintainer needs more info)» closed
 
 

Drupal is a registered trademark of Dries Buytaert.