CMS MADE SIMPLE FORGE

TinyMCE

 

[#7345] TinyMCE cmslinker plugin do not show correctly characters

avatar
Created By: Jaroslav Drzik (jvd)
Date Submitted: Tue Dec 13 09:43:32 -0500 2011

Assigned To: Morten Poulsen (silmarillion)
Version: 2.9.4
CMSMS Version: None
Severity: Minor
Resolution: None
State: Closed
Summary:
TinyMCE cmslinker plugin do not show correctly characters
Detailed Description:
TinyMCE cms linker plugin do not show correctly characters in cmslinker menu
wich are in encoding other then iso-8859-1 it shows characters as ?.
I examine problem and found solution. I have attached patch:

--- TinyMCE.module.php.old      2011-12-12 16:03:25.196579107 +0100
+++ TinyMCE.module.php  2011-12-13 15:14:39.461996199 +0100
@@ -425,12 +425,13 @@
     $menutext = str_replace("\r", "", $menutext);
     $menutext = str_replace("\t", "", $menutext);

-    if (strlen(utf8_decode($menutext)) > 30) {
-      $menutext = htmlspecialchars(utf8_encode(substr(utf8_decode($menutext),
0, 30)), ENT_QUOTES, 'UTF-8') . " …";
+    if (mb_strlen($menutext,"UTF-8")>30) {
+     
$menutext=htmlspecialchars(mb_substr($menutext,0,30,'UTF-8'),ENT_QUOTES)."
…";
     } else {
-      $menutext = htmlspecialchars($menutext, ENT_QUOTES, 'UTF-8');
+      $menutext=htmlspecialchars($menutext,ENT_QUOTES);
     }

+
     $result.="
" . $menu . ".add({title : '" .
$menutext . "', onclick : function() {
var
sel=tinyMCE.activeEditor.selection.getContent();


History

Comments
avatar
Date: 2016-02-12 13:22
Posted By: Rolf (rolf1)

TinyMCE version 3.x is released, the module is a complete rewrite of all code.

Because of this, bug reports related to the old version are not relevant anymore
and will be closed. Please use the latest and finest release at your CMSMS 2.x
website and test again. If you feel like your issue still isn't fixed create a
new report. Thanks.
      
Updates

Updated: 2016-02-12 13:22
cmsms_version_id: 29321 => -1
state: Open => Closed

Updated: 2011-12-13 09:44
description: TinyMCE cms linker plugin do not show correctly chracters in cmslinker menu wich are in encoding other then iso-8859-1 it shows characters as ?. I examine problem and found solution. I have attached patch: --- TinyMCE.module.php.old 2011-12-12 16 => TinyMCE cms linker plugin do not show correctly characters in cmslinker menu wich are in encoding other then iso-8859-1 it shows characters as ?. I examine problem and found solution. I have attached patch: --- TinyMCE.module.php.old 2011-12-12 1
summary: TinyMCE cmslinker plugin do not show correctly chracters => TinyMCE cmslinker plugin do not show correctly characters
resolution_id: => 5