| Author |
Message |
slackervaara Worker


Joined: Aug 26, 2007 Posts: 106
|
Posted:
Sat Dec 22, 2007 8:34 am |
|
I have a PHP-Nuke 7.6 site patched 3.3. When I use the Search module for articles words with Scandinavian letters هنِ are not found anylonger. But if I use the original index.php for 7.6 it works correctly. I have tried to use the index.php from latest RavenNuke, but it had the problem too. Is there a simple fix for this? |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7339 Location: Arizona
|
Posted:
Sat Dec 22, 2007 9:04 am |
|
Unfortunately, I have found so much bubblegum and bailing wire in nuke and the patches that in some cases these are getting broken. Let us try this. Please use the index.php from RavenNuke and make these changes and let us know how this works:
=== FIND ===
| Code: |
$query = stripslashes(htmlentities($query, ENT_QUOTES));
|
=== REPLACE WITH ===
| Code: |
$query = check_html($query, 'nohtml'); // This will also take care of stripslashes but only if needed
|
=== FIND ===
| Code: |
.'<input size="25" type="text" name="query" value="'.$query.'" /> '
|
=== REPLACE WITH ===
| Code: |
.'<input size="25" type="text" name="query" value="'.htmlentities($query, ENT_QUOTES).'" /> '
|
=== FIND ===
| Code: |
$query = stripslashes(check_html($query, 'nohtml'));
|
=== REPLACE WITH OR REMOVE ===
| Code: |
// $query = stripslashes(check_html($query, 'nohtml'));
|
=== FIND WITHIN A WHILE LOOP ===
| Code: |
$query = stripslashes(check_html($query, 'nohtml'));
|
=== REPLACE WITH ===
| Code: |
// $query = stripslashes(check_html($query, 'nohtml'));
|
=== DONE ===
What a mess...  |
|
|
|
 |
slackervaara Worker


Joined: Aug 26, 2007 Posts: 106
|
Posted:
Sat Dec 22, 2007 9:29 am |
|
I used the index.php from latest RavenNuke.
After the first of your substitutions it worked normally. I then made all other changes and they also gave a fully functional Search with Scandinavian letters.
Many thanks! Excellent work! |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7339 Location: Arizona
|
Posted:
Sat Dec 22, 2007 7:34 pm |
|
|
|
 |
slackervaara Worker


Joined: Aug 26, 2007 Posts: 106
|
Posted:
Sun Jan 20, 2008 1:52 am |
|
There is a similar bug also in Search of the Web_Links module.
I changed the line in modules/Web_Links/index.php:
$query = htmlentities($query, ENT_QUOTES);
to
$query = check_html($query, nohtml); |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7339 Location: Arizona
|
Posted:
Fri Feb 08, 2008 7:33 am |
|
Unfortunately, this presents a really bad "wrinkle". The advanced editor actually mucks with the user's input and produces entities and saves these into the data within the stories (for example). Therefore, for searching, if the raw characters are used, they are not found. I would have to write specific code to inspect the $advanced_editor field and do different things depending upon which module's data is being searched.
What a P.I.T.A.!
I am just going to have to deal with these things on a case-by-case basis within the forums.  |
|
|
|
 |
|
|
|
|