Login

Who's Online

We have 1 guest online

Google








Home arrow Programmingarrow Joomla Extensionsarrow Problem with apostrophe
Discussion Forum
August 20, 2008, 12:27:49 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Problem with apostrophe  (Read 1280 times)
Luca
Newbie
*
Posts: 1


View Profile Email
« on: December 29, 2007, 01:52:12 AM »

Dear all,

I have one problem with the apostrophe: when I put  a title like

L'occupazione costiera

then the result in the frontend is

L\'occupazione costiera

is there any solution?

Thanks!!
« Last Edit: January 03, 2008, 06:48:14 PM by Luca » Logged
Mark Austin
Administrator
Jr. Member
*****
Posts: 97



View Profile Email
« Reply #1 on: January 08, 2008, 03:14:31 PM »

There is a bug in the code regarding apostrophes, unfortunately I do not have time to fix it at the moment.
Logged
Carpentier
Newbie
*
Posts: 1


View Profile Email
« Reply #2 on: January 23, 2008, 03:25:54 PM »

I hacked the component and it now works when entering references manually from admin backend. I can't check wether it works or not when importing a file.
If you allow users to enter references in frontend, same hack should apply in components/com_jombib/jombib.php for update and save functions (line 266, 702 and 763 I suppose)

3 lines to correct in administrator/components/com_jombib/admin.jombib.php

215 $updates[]=$key."='".mysql_real_escape_string($data)."'";
becomes
215 $updates[]=$key."='".$data."'";

642 $paper[$fieldsgiven]=ereg_replace('[{}]','',mysql_real_escape_string($valuesgiven));
becomes
642 $paper[$fieldsgiven]=ereg_replace('[{}]','',$valuesgiven);

704 $author[$afield]=ereg_replace('[{}]','',mysql_real_escape_string($avalues));
becomes
704 $author[$afield]=ereg_replace('[{}]','',$avalues);

Hope this helps Wink

Dear all,

I have one problem with the apostrophe: when I put  a title like

L'occupazione costiera

then the result in the frontend is

L\'occupazione costiera

is there any solution?

Thanks!!
Logged
Franka
Newbie
*
Posts: 23


View Profile Email
« Reply #3 on: February 08, 2008, 02:36:42 PM »

Will this fix be included in the next version?
Are there any risks with using this change?
Logged
Mark Austin
Administrator
Jr. Member
*****
Posts: 97



View Profile Email
« Reply #4 on: February 15, 2008, 09:00:13 AM »

That is a sensible short term fix for the problem,  however it now means that if you try to enter a string which is not mysql safe, i.e. unusual characters ( I cannot remember which) then the data might not get added.
Logged
Franka
Newbie
*
Posts: 23


View Profile Email
« Reply #5 on: February 24, 2008, 09:50:02 PM »

Cannot search including an apostrophe

Warning: Invalid argument supplied for foreach() in
../components/com_jombib/jombib.php on line 597
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
© 2008 Everything That I Know About