• Resolved Anonymous User 911526

    (@anonymized-911526)


    Hi, I have discovered that I am not able to search for links using the Danish characters æ, ø, å.

    These characters work fine when searching posts using the built in search field, but not when I am using the [link-library-search settings=1] shortcode (I am using the great Danish translation of the plugin).

    I am also using the Relevanssi search plugin, but I don’t think this has anything to do with it (have tried disabling).

    I would really like to know if anyone else experiences this or know what might cause it. The site I am building is private, but login is possible with this info:

    username: testuser
    password: userfortesting

    URL: opskrifter.frugtformidlingen.dk (click ‘Links’ in the menu).

    Hope someone can help, thanks!

    Esben

    http://wordpress.org/extend/plugins/link-library/

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have the same problem. my website is Japanese website, the plugin does not support Japanese Kanji search (Kanji UTF-8). English word search is OK.
    Who can resolve this problem?

    Thread Starter Anonymous User 911526

    (@anonymized-911526)

    Hi Jircas

    I had some help in figuring this out, so see if this works for you. As far as I understood, it’s a security thing. In line 4064 of link-library.php (ver. 5.6.9) it states:

    if (ctype_alpha($searchterm) == true)

    which apparently causes the error. The guy who helped me out used mysql_escape_string as protection, adding on line 4054

    $searchterms = explode(" ", mysql_escape_string($_GET['searchll']));

    This seemed to fix the error in my case. Hope it works for you as well. Entire file is pasted here: http://pastebin.com/TYLwqu4f – hope this is good with the plugin author.

    Esben

    jircas

    (@leifang)

    thank you, eshenh,

    I just try to follow what you told above to modify that line, but it does not work.
    now I comment out that line:
    if (ctype_alpha($searchterm) == true)
    everything is OK.
    It may have some security things as you said. But I don’t truly understand the purpose the plugin author adds this line for.

    Thread Starter Anonymous User 911526

    (@anonymized-911526)

    Yeah, I’m not entirely sure what it does myself, but as far as I can see, it checks if the search term is alphabetical: ctype_alpha

    I think, that if you comment out the line, you will allow for searches that contain non-alphabetical characters and that might be a security risk. Not sure if this is critical, though.

    jircas

    (@leifang)

    Yeah, I need search Japanese word, as well as alpha.
    after I remove that line, It can finish this job.

    Thread Starter Anonymous User 911526

    (@anonymized-911526)

    I’m glad you can finish it now 🙂 . I am going to mark the topic resolved. Have a nice day!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Search with foreign characters (Danish æ ø å) not working’ is closed to new replies.