Apostrophe Issue

Need help with a WYSIWYG-editor in Joomla! 1.0.x? This is the place to be.

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.
Locked
User avatar
yerg
Joomla! Ace
Joomla! Ace
Posts: 1013
Joined: Thu Aug 18, 2005 12:22 pm
Location: Ballarat, Australia
Contact:

Apostrophe Issue

Post by yerg » Thu Mar 23, 2006 10:01 pm

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.
We cannot become what we need to be ... by remaining what we are

User avatar
jxl
Joomla! Guru
Joomla! Guru
Posts: 650
Joined: Wed Dec 21, 2005 10:32 pm
Contact:

Re: Apostrophe Issue

Post by jxl » Thu Mar 30, 2006 2:40 pm

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.

User avatar
yerg
Joomla! Ace
Joomla! Ace
Posts: 1013
Joined: Thu Aug 18, 2005 12:22 pm
Location: Ballarat, Australia
Contact:

Re: Apostrophe Issue

Post by yerg » Mon Apr 03, 2006 8:50 pm

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.  ???
We cannot become what we need to be ... by remaining what we are

User avatar
jxl
Joomla! Guru
Joomla! Guru
Posts: 650
Joined: Wed Dec 21, 2005 10:32 pm
Contact:

Re: Apostrophe Issue

Post by jxl » Mon Apr 03, 2006 10:24 pm

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 &#039&#059  or some variaton on that?

In any case, I would try installing a different WYSIWYG editor and see if that works.

User avatar
yerg
Joomla! Ace
Joomla! Ace
Posts: 1013
Joined: Thu Aug 18, 2005 12:22 pm
Location: Ballarat, Australia
Contact:

Re: Apostrophe Issue

Post by yerg » Tue Apr 04, 2006 7:42 am

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)
We cannot become what we need to be ... by remaining what we are

User avatar
-TomJ-
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Wed Feb 15, 2006 12:51 pm
Location: Stongfjorden, Noreg

Re: Apostrophe Issue

Post by -TomJ- » Tue Apr 04, 2006 12:00 pm

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 é ??

-------------------
-t- · Tom Jacobs
-------------------

User avatar
norman
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Thu Aug 18, 2005 2:25 pm
Location: us
Contact:

Re: Apostrophe Issue

Post by norman » Mon Aug 21, 2006 11:10 am

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.
Last edited by norman on Mon Aug 21, 2006 11:47 am, edited 1 time in total.
"The journey is the destination"

User avatar
yerg
Joomla! Ace
Joomla! Ace
Posts: 1013
Joined: Thu Aug 18, 2005 12:22 pm
Location: Ballarat, Australia
Contact:

Re: Apostrophe Issue

Post by yerg » Mon Aug 21, 2006 10:25 pm

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.
We cannot become what we need to be ... by remaining what we are

User avatar
Wizzie
Joomla! Hero
Joomla! Hero
Posts: 2701
Joined: Tue Sep 06, 2005 4:37 am
Location: Australia
Contact:

Re: Apostrophe Issue

Post by Wizzie » Sat Sep 09, 2006 10:03 am

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.

Leuviah
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Sep 22, 2006 2:37 pm

Re: Apostrophe Issue

Post by Leuviah » Wed Dec 06, 2006 4:04 pm

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 (' => &#039, " => ", > => >, 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):

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)
but when loaded into the editor, I get:

Code: Select all

À l'école de la vie.
Notice the é isn't converted to é neither is the À. Anyone else is experiencing such behaviour?

Thanks

Leuviah
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Sep 22, 2006 2:37 pm

Re: Apostrophe Issue

Post by Leuviah » Thu Dec 07, 2006 5:29 am

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):

Code: Select all

function mosMakeHtmlSafe( &$mixed, $quote_style=ENT_QUOTES, $exclude_keys='' ) { 
to

Code: Select all

function mosMakeHtmlSafe( &$mixed, $quote_style=ENT_COMPAT, $exclude_keys='' ) { 
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  8)
Last edited by Leuviah on Thu Dec 07, 2006 5:42 am, edited 1 time in total.

rygle
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Aug 25, 2005 2:40 am

Re: Apostrophe Issue

Post by rygle » Thu Jan 25, 2007 1:08 pm

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

&apos;

This really should be fixed in Joomla itself though!

Cheers,

Rygle

bensti
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Mar 06, 2007 5:40 pm

Re: Apostrophe Issue

Post by bensti » Thu Mar 15, 2007 2:37 pm

@Leuviah : Don't work for me...anyone have other solution?

bensti
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Mar 06, 2007 5:40 pm

Re: Apostrophe Issue

Post by bensti » Thu Mar 15, 2007 5:14 pm

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

zyltar
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Mon Jan 18, 2010 3:03 pm

Re: Apostrophe Issue

Post by zyltar » Mon Apr 22, 2013 1:50 pm

Hi,
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.

zyltar
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Mon Jan 18, 2010 3:03 pm

Re: Apostrophe Issue

Post by zyltar » Mon Apr 22, 2013 1:59 pm

Hi,
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 
and should be

Code: Select all

Magic quotes (ajout antislash aux guillemets) = False 
Is there any known draw back to change this parameter ?

zyltar
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Mon Jan 18, 2010 3:03 pm

Re: Apostrophe Issue

Post by zyltar » Mon Apr 22, 2013 2:36 pm

Hi,
I am with Joomla 3 but with my search I did not see I answered to a very old post.
Sorry

CampaignPromo
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Fri Apr 11, 2014 9:40 pm
Location: Tennessee, USA and Bremen, Germany
Contact:

Re: Apostrophe Issue

Post by CampaignPromo » Fri Apr 11, 2014 9:56 pm

Solution posted here, should anyone else have this problem: :)
http://forum.joomla.org/viewtopic.php?f=709&t=802067


Locked

Return to “WYSIWYG Editors - 1.0.x”