Joomla! Discussion Forums



It is currently Sun Nov 08, 2009 7:36 am (All times are UTC )

 





Post new topic Reply to topic  [ 17 posts ] 
Author Message
Posted: Thu Feb 02, 2006 9:16 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11542
Location: **Translation Matters**
When entering a nonascii character (É for example), TinyMCE is encoding it as html entities.
This gives in the db and in Source:
É

Therefore the search function is not working.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Last edited by Jinx on Mon Feb 20, 2006 2:00 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Thu Feb 02, 2006 9:22 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 6:58 am
Posts: 1447
Location: Tønsberg, Norway
For some reason this has been removed from the code!

http://forum.joomla.org/index.php/topic,25736.0.html

_________________
Jens-Christian Skibakk - Norwegian Translation Coordinator
MMS Blog - http://mms.pipp.no/
Joomla! i Norge / Joomla! in Norway - http://www.joomlainorge.no/


Top
   
 
Posted: Thu Feb 02, 2006 9:52 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11542
Location: **Translation Matters**
Your trick does not work anymore "raw". I had to take off all this from tiny_mce.js file to get the charactyers to be displayed normally:
Code:
this.defParam("entities","160,nbsp,38,amp,34,quot,162,cent,8364,euro,163,pound,165,yen,169,copy,174,reg,8482,trade,8240,permil,181,micro,183,middot,8226,bull,8230,hellip,8242,prime,8243,Prime,167,sect,182,para,223,szlig,8249,lsaquo,8250,rsaquo,171,laquo,187,raquo,8216,lsquo,8217,rsquo,8220,ldquo,8221,rdquo,8218,sbquo,8222,bdquo,60,lt,62,gt,8804,le,8805,ge,8211,ndash,8212,mdash,175,macr,8254,oline,164,curren,166,brvbar,168,uml,161,iexcl,191,iquest,710,circ,732,tilde,176,deg,8722,minus,177,plusmn,247,divide,8260,frasl,215,times,185,sup1,178,sup2,179,sup3,188,frac14,189,frac12,190,frac34,402,fnof,8747,int,8721,sum,8734,infin,8730,radic,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8712,isin,8713,notin,8715,ni,8719,prod,8743,and,8744,or,172,not,8745,cap,8746,cup,8706,part,8704,forall,8707,exist,8709,empty,8711,nabla,8727,lowast,8733,prop,8736,ang,180,acute,184,cedil,170,ordf,186,ordm,8224,dagger,8225,Dagger,192,Agrave,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,202,Ecirc,203,Euml,204,Igrave,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,212,Ocirc,213,Otilde,214,Ouml,216,Oslash,338,OElig,217,Ugrave,219,Ucirc,220,Uuml,376,Yuml,222,THORN,224,agrave,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,234,ecirc,235,euml,236,igrave,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,244,ocirc,245,otilde,246,ouml,248,oslash,339,oelig,249,ugrave,251,ucirc,252,uuml,254,thorn,255,yuml,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,8501,alefsym,982,piv,8476,real,977,thetasym,978,upsih,8472,weierp,8465,image,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8756,there4,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,173,shy,233,eacute,237,iacute,243,oacute,250,uacute,193,Aacute,225,aacute,201,Eacute,205,Iacute,211,Oacute,218,Uacute,221,Yacute,253,yacute");this.defParam("entity_encoding","named");

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Thu Feb 02, 2006 10:00 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 6:58 am
Posts: 1447
Location: Tønsberg, Norway
It did for me, I tested now. But you have to retype the text after the change, a resave doesn't fix it.

But a Cut/Past fixed it.

_________________
Jens-Christian Skibakk - Norwegian Translation Coordinator
MMS Blog - http://mms.pipp.no/
Joomla! i Norge / Joomla! in Norway - http://www.joomlainorge.no/


Top
   
 
Posted: Thu Feb 02, 2006 10:06 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11542
Location: **Translation Matters**
did that to no effect, the html window would keep showing the entity.
Well I guess it will be solved anyway...  ;)

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Thu Feb 02, 2006 10:32 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11542
Location: **Translation Matters**
Louis just did it (I had not put the 2 slashes... :( )

Works ok now

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Wed Feb 08, 2006 7:36 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 6:58 am
Posts: 1447
Location: Tønsberg, Norway
It has come to my knowledge that this fix has som undesired flaws. When the entity_encoding is set to raw the user can type anything into the editor. I can write and it is treated as a tag, and not the text , the < and > is stored untoched in the database.

The problem is discussed in the tinymce forum, http://tinymce.moxiecode.com/punbb/viewtopic.php?id=640, so the actuall fix seems to be using this parameter to TinyMCE, and not the entity_encoding.
http://tinymce.moxiecode.com/tinymce/do ... ities.html

_________________
Jens-Christian Skibakk - Norwegian Translation Coordinator
MMS Blog - http://mms.pipp.no/
Joomla! i Norge / Joomla! in Norway - http://www.joomlainorge.no/


Top
   
 
Posted: Wed Feb 08, 2006 7:47 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 6:58 am
Posts: 1447
Location: Tønsberg, Norway
It seems like a better solution is to change the entity_encoding i tinymce.php with
Code:
entities : "160,nbsp,38,amp,60,lt,62,gt",


This fixes the <, > and & characters.

_________________
Jens-Christian Skibakk - Norwegian Translation Coordinator
MMS Blog - http://mms.pipp.no/
Joomla! i Norge / Joomla! in Norway - http://www.joomlainorge.no/


Top
   
 
Posted: Thu Feb 09, 2006 5:27 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11542
Location: **Translation Matters**
In fact, this is what I did to get TMEDit to work for utf-8.

I uncommented the lines in tmedit.js
Code:
TMEdit.htmlEncode = function(str) {
   //str = str.replace(/&/ig, "&");
   str = str.replace(/</ig, "<");
   str = str.replace(/>/ig, ">");
   //str = str.replace(/\xA0/g, " ");
   //str = str.replace(/\x22/ig, """);
   //str = str.replace(/\u00e4/g, "ä");
   //str = str.replace(/\u00c4/g, "Ä");
   //str = str.replace(/\u00f6/g, "ö");
   //str = str.replace(/\u00d6/g, "Ö");
   //str = str.replace(/\u00fc/g, "ü");
   //str = str.replace(/\u00dc/g, "Ü");
   //str = str.replace(/\u00df/g, "ß");
   return str;
};


Is it necessary to include the ampersand and the non-breaking space in the list ?

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Thu Feb 09, 2006 8:37 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 6:58 am
Posts: 1447
Location: Tønsberg, Norway
No, it seems that the code for ampersand and non-breaking space can be left out.

So the line to use is
Code:
entities : "60,lt,62,gt",

_________________
Jens-Christian Skibakk - Norwegian Translation Coordinator
MMS Blog - http://mms.pipp.no/
Joomla! i Norge / Joomla! in Norway - http://www.joomlainorge.no/


Top
   
 
Posted: Thu Feb 09, 2006 9:45 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11542
Location: **Translation Matters**
I move the thread back to unresolved part.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Fri Feb 17, 2006 10:00 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11542
Location: **Translation Matters**
In fact, we have 2 changes to perform.

1. In TinyMCE.js

change all content for def entities to:
_def("entities","named")

2. Then add in TinyMCE.php the line "entities" here:
relative_urls : false,
entities : \"60,lt,62,gt\",
entity_encoding : \"raw\",

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Fri Feb 17, 2006 10:07 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 6:58 am
Posts: 1447
Location: Tønsberg, Norway
The line entity_encoding : \"raw\", should not be included.

So i guess that the _def("entities","named") is obsolete when entitiy_encoding is left out?


I only added the entities : \"60,lt,62,gt\", to the tinymce.php.
And that worked for me.


Have you found some more problems so the other changes you did is necessary?

_________________
Jens-Christian Skibakk - Norwegian Translation Coordinator
MMS Blog - http://mms.pipp.no/
Joomla! i Norge / Joomla! in Norway - http://www.joomlainorge.no/


Top
   
 
Posted: Fri Feb 17, 2006 11:31 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 11542
Location: **Translation Matters**
jenscski wrote:
The line entity_encoding : \"raw\", should not be included.

So i guess that the _def("entities","named") is obsolete when entitiy_encoding is left out?


I only added the entities : \"60,lt,62,gt\", to the tinymce.php.
And that worked for me.


Have you found some more problems so the other changes you did is necessary?

I have not tested. It only seemed logical to do it this way.
You have to define I guess the entities to use.
Therefore, if the 2 entities are the only left in the js file, one may safely take off the 2 lines in the php file.
entities : ---
and
entity_encoding: ---

What does your php file (the init part) looks like now?
If it looks like this:
entities : \"60,lt,62,gt\",

that means indeed that this setting is overpassing the js completely and it is easier to implement  ;)

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr · GMT +1
Qui vult dare parva non debet magna rogare.
---------------------------------
Joomla! Translation Coordination Team


Top
  E-mail  
 
Posted: Fri Feb 17, 2006 11:43 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 6:58 am
Posts: 1447
Location: Tønsberg, Norway
It's easier to implement, and to maintain.

If you change the js file the change need to be redone each time TinyMCE is updated.


The only change I make to the tinymce.php file is that I add the entities : \"60,lt,62,gt\",

_________________
Jens-Christian Skibakk - Norwegian Translation Coordinator
MMS Blog - http://mms.pipp.no/
Joomla! i Norge / Joomla! in Norway - http://www.joomlainorge.no/


Top
   
 
Posted: Mon Feb 20, 2006 2:00 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6431
Fixed on SVN, thanks guys !

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
   
 
Posted: Tue Feb 28, 2006 7:01 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 10:32 am
Posts: 681
Location: South Africa
I have posted a request for assistance with this in the TinyMCE Working group forum.

_________________
just because you're not paranoid, doesn't mean everybody isn't out to get you.
http://www.maketradefair.org


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group