Apostrophe Issue
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
- yerg
- Joomla! Ace
- Posts: 1016
- Joined: Thu Aug 18, 2005 12:22 pm
- Location: Ballarat, Australia
- Contact:
Apostrophe Issue
This is a strange one.
Have a client in Canada who can't use apostrophe's or inverted commas in Content Titles on her site.
I'm in Australia and have no problems doing the same thing on her site.
This applied to mos_CE, FCK and now JCE and happens in either FF or IE
Is there some peculiarity with USA/Canadian keyboards etc that may cause this. Am at a total loss.
Must be a setting somewhere in her browser/system causing problems.
Have a client in Canada who can't use apostrophe's or inverted commas in Content Titles on her site.
I'm in Australia and have no problems doing the same thing on her site.
This applied to mos_CE, FCK and now JCE and happens in either FF or IE
Is there some peculiarity with USA/Canadian keyboards etc that may cause this. Am at a total loss.
Must be a setting somewhere in her browser/system causing problems.
We cannot become what we need to be ... by remaining what we are
- jxl
- Joomla! Guru
- Posts: 650
- Joined: Wed Dec 21, 2005 10:32 pm
- Contact:
Re: Apostrophe Issue
Check to make sure you can do it when you are signed in as her. Users can have different editors than other users have configured. Perhaps she is using one with code stripping turned on and you have code stripping turned off? Might be worth checking.
- yerg
- Joomla! Ace
- Posts: 1016
- Joined: Thu Aug 18, 2005 12:22 pm
- Location: Ballarat, Australia
- Contact:
Re: Apostrophe Issue
I've tried logging in as her and no difference.
There is only one editor installed.
What's happening is that the apostrophe gets turned into: '
I can't get away from the nothion that it's keyboard settings that is causing this.
There is only one editor installed.
What's happening is that the apostrophe gets turned into: '
I can't get away from the nothion that it's keyboard settings that is causing this.
We cannot become what we need to be ... by remaining what we are
- jxl
- Joomla! Guru
- Posts: 650
- Joined: Wed Dec 21, 2005 10:32 pm
- Contact:
Re: Apostrophe Issue
Well, that is indeed a character reference for an apostrophe...
Does the editor place that as html code (Which sould just give you an apostrophe on the front end, but mabe some browser want to just see ' and so render the character code literally when it has the zero) or does it place it as '; or some variaton on that?
In any case, I would try installing a different WYSIWYG editor and see if that works.
Does the editor place that as html code (Which sould just give you an apostrophe on the front end, but mabe some browser want to just see ' and so render the character code literally when it has the zero) or does it place it as '; or some variaton on that?
In any case, I would try installing a different WYSIWYG editor and see if that works.
- yerg
- Joomla! Ace
- Posts: 1016
- Joined: Thu Aug 18, 2005 12:22 pm
- Location: Ballarat, Australia
- Contact:
Re: Apostrophe Issue
As per my original post this applied to mos_CE, FCK and now JCE and happens in either FF or IE.
She types and ' and it comes out visually as ' in the public viewable page.
I can put ' or " and it's no big deal but her's just screws around.
I dunno what othere editors there are that are useable (some more are available but are unusable as far as I'm concerned)
She types and ' and it comes out visually as ' in the public viewable page.
I can put ' or " and it's no big deal but her's just screws around.
I dunno what othere editors there are that are useable (some more are available but are unusable as far as I'm concerned)
We cannot become what we need to be ... by remaining what we are
- -TomJ-
- Joomla! Apprentice
- Posts: 38
- Joined: Wed Feb 15, 2006 12:51 pm
- Location: Stongfjorden, Noreg
Re: Apostrophe Issue
Could it be that your Canadian friend has a bilingual EN-FR keyboard setting?
Dutch - which is my tongue - uses accented characters as well as French, and my keyboard settings allow me to type the ' first and then the e, to result in é ??
Dutch - which is my tongue - uses accented characters as well as French, and my keyboard settings allow me to type the ' first and then the e, to result in é ??
-------------------
-t- · Tom Jacobs
-------------------
- norman
- Joomla! Enthusiast
- Posts: 107
- Joined: Thu Aug 18, 2005 2:25 pm
- Location: us
- Contact:
Re: Apostrophe Issue
Did you ever figure out what was causing this? I have the same problem but it happens with no wysiwyg editor turned on as well.
I can also replicate this on the demo site. Apostrophe's are converted to their code equvalent in the meta tag fields as well. Not in the content area however or the title.
I can also replicate this on the demo site. Apostrophe's are converted to their code equvalent in the meta tag fields as well. Not in the content area however or the title.
Last edited by norman on Mon Aug 21, 2006 11:47 am, edited 1 time in total.
"The journey is the destination"
- yerg
- Joomla! Ace
- Posts: 1016
- Joined: Thu Aug 18, 2005 12:22 pm
- Location: Ballarat, Australia
- Contact:
Re: Apostrophe Issue
Have not found a resolution.
Given up and the person is re writing stuff without an apostrophe.
We checked her keyboard setting and regional settings and they are exactly the same as mine.
Whether it is something to to with the Canadian version of Windoze I dunno.
Sorry I couldn't assist.
Given up and the person is re writing stuff without an apostrophe.
We checked her keyboard setting and regional settings and they are exactly the same as mine.
Whether it is something to to with the Canadian version of Windoze I dunno.
Sorry I couldn't assist.
We cannot become what we need to be ... by remaining what we are
- Wizzie
- Joomla! Hero
- Posts: 2701
- Joined: Tue Sep 06, 2005 4:37 am
- Location: Australia
- Contact:
Re: Apostrophe Issue
We have seen something similar in a variety of Operating Systems and applications in the past.
Check if the user has a US/US leybaord but has their language set configured US/FR/ (CA? Canadian?) If they are on Windows, there is definitely a MS Tech Assist for this in their knowledge base. (We saw it showing up in the manner of in some applications on the users PC, they had to press the space bar following apostrpohe's, quotes and alike before they saw the character show up on the screen.
Check if the user has a US/US leybaord but has their language set configured US/FR/ (CA? Canadian?) If they are on Windows, there is definitely a MS Tech Assist for this in their knowledge base. (We saw it showing up in the manner of in some applications on the users PC, they had to press the space bar following apostrpohe's, quotes and alike before they saw the character show up on the screen.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Fri Sep 22, 2006 2:37 pm
Re: Apostrophe Issue
I also have this issue. Whan happens is that the ' character is input correctly, and saved correctly in the database. But when it gets loaded in the editor (wether it be TinyMCE, JCE, FCK, No Editor), apostrophe characters (and some others) are converted to entity representation (' => ', " => ", > => >, etc) which makes editing and translation very difficult. I agree some characters don't go in META tags, but the ' is fairly common.
I do use a Canadian French keyboard, but I doubt that this configuration has anything to do with it. I tested with FF/IE, on two different servers. The Meta Data gets into the database properly (no entity are saved, only the actual characters):
but when loaded into the editor, I get:
Notice the é isn't converted to é neither is the À. Anyone else is experiencing such behaviour?
Thanks
I do use a Canadian French keyboard, but I doubt that this configuration has anything to do with it. I tested with FF/IE, on two different servers. The Meta Data gets into the database properly (no entity are saved, only the actual characters):
Code: Select all
mysql> select metakey from jos_content where id = 4;
+----------------------+
| metakey |
+----------------------+
| À l'école de la vie. |
+----------------------+
1 row in set (0.00 sec)
Code: Select all
À l'école de la vie.
Thanks
-
- Joomla! Apprentice
- Posts: 10
- Joined: Fri Sep 22, 2006 2:37 pm
Re: Apostrophe Issue
Allright, for anyone interrested in a quick fix for this, here it is.
The problem araises when the php function htmlspecialchars is called in /include/joomla.php's mosMakeHtmlSafe function. By default, it will convert all quotes to their entity representation. mosMakeHtmlSafe is called on the whole database row before editing in functions editContent of /administrator/components/com_content/admin.content.html.php (backend) and /components/com_content/content.html.php (frontend).
So, and I say again, as a quick fix, one could turn the default ENT_QUOTES to ENT_COMPAT in /include/joomla.php function mosMakeHtmlSafe (line 3569 in version 1.0.11):
to
That will keep all ' characters in META fields intact - as well as in all other fields by the way. It works because Joomla outputs meta data in double-quotes.
It seems to work fine here. I haven't analysed the deep repercussions of that change though... so you should test this before putting it to production. Another - less involved - possibility would be to change the two mosMakeHtmlSafe calls in the /administrator/components/com_content/admin.content.html.php (backend) and /components/com_content/content.html.php (frontend) files to specify ENT_COMPAT.
I'm curious - what do the developpers think of that?
Thanks, happy Joomlaying
The problem araises when the php function htmlspecialchars is called in /include/joomla.php's mosMakeHtmlSafe function. By default, it will convert all quotes to their entity representation. mosMakeHtmlSafe is called on the whole database row before editing in functions editContent of /administrator/components/com_content/admin.content.html.php (backend) and /components/com_content/content.html.php (frontend).
So, and I say again, as a quick fix, one could turn the default ENT_QUOTES to ENT_COMPAT in /include/joomla.php function mosMakeHtmlSafe (line 3569 in version 1.0.11):
Code: Select all
function mosMakeHtmlSafe( &$mixed, $quote_style=ENT_QUOTES, $exclude_keys='' ) {
Code: Select all
function mosMakeHtmlSafe( &$mixed, $quote_style=ENT_COMPAT, $exclude_keys='' ) {
It seems to work fine here. I haven't analysed the deep repercussions of that change though... so you should test this before putting it to production. Another - less involved - possibility would be to change the two mosMakeHtmlSafe calls in the /administrator/components/com_content/admin.content.html.php (backend) and /components/com_content/content.html.php (frontend) files to specify ENT_COMPAT.
I'm curious - what do the developpers think of that?
Thanks, happy Joomlaying
Last edited by Leuviah on Thu Dec 07, 2006 5:42 am, edited 1 time in total.
-
- Joomla! Apprentice
- Posts: 11
- Joined: Thu Aug 25, 2005 2:40 am
Re: Apostrophe Issue
Hi guys,
You can try the solution here;
http://forum.joomla.org/index.php/topic,72585.0.html
Or you can try using HTML straight in your text in the place of '
’
or
'
This really should be fixed in Joomla itself though!
Cheers,
Rygle
You can try the solution here;
http://forum.joomla.org/index.php/topic,72585.0.html
Or you can try using HTML straight in your text in the place of '
’
or
'
This really should be fixed in Joomla itself though!
Cheers,
Rygle
-
- Joomla! Fledgling
- Posts: 3
- Joined: Tue Mar 06, 2007 5:40 pm
Re: Apostrophe Issue
@Leuviah : Don't work for me...anyone have other solution?
-
- Joomla! Fledgling
- Posts: 3
- Joined: Tue Mar 06, 2007 5:40 pm
Re: Apostrophe Issue
I have found how fix the problem with the ' (apostrophe) in the meta tag
First of all don't modify the metatag in the administrator panel, go to the configuration.php and before the ' put a back slash
exemple :
$mosConfig_MetaDesc = 'Centre d\'expertise';
It should work.
Ben
First of all don't modify the metatag in the administrator panel, go to the configuration.php and before the ' put a back slash
exemple :
$mosConfig_MetaDesc = 'Centre d\'expertise';
It should work.
Ben
-
- Joomla! Intern
- Posts: 85
- Joined: Mon Jan 18, 2010 3:03 pm
Re: Apostrophe Issue
Hi,
I got the same problem with a site in french with a french-swiss keyboard. The problem arrives with
This is really annoying.
Thx for your help.
I got the same problem with a site in french with a french-swiss keyboard. The problem arrives with
or"
Moreover with JCE editor all images added got a'
before and after the url, caption and size. This break the link and the image don't appears./"
This is really annoying.
Thx for your help.
-
- Joomla! Intern
- Posts: 85
- Joined: Mon Jan 18, 2010 3:03 pm
Re: Apostrophe Issue
Hi,
In my local webserver I don't get the same issue, I suspect this problem is due to php.ini
and should be
Is there any known draw back to change this parameter ?
In my local webserver I don't get the same issue, I suspect this problem is due to php.ini
Code: Select all
Magic quotes (ajout antislash aux guillemets) = True
Code: Select all
Magic quotes (ajout antislash aux guillemets) = False
-
- Joomla! Intern
- Posts: 85
- Joined: Mon Jan 18, 2010 3:03 pm
Re: Apostrophe Issue
Hi,
I am with Joomla 3 but with my search I did not see I answered to a very old post.
Sorry
I am with Joomla 3 but with my search I did not see I answered to a very old post.
Sorry
-
- Joomla! Apprentice
- Posts: 45
- Joined: Fri Apr 11, 2014 9:40 pm
- Location: Tennessee, USA and Bremen, Germany
- Contact:
Re: Apostrophe Issue
Solution posted here, should anyone else have this problem:
http://forum.joomla.org/viewtopic.php?f=709&t=802067
http://forum.joomla.org/viewtopic.php?f=709&t=802067