[solved] cms linker tinymce function menu bug

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
samplist
Forum Members
Forum Members
Posts: 38
Joined: Fri Sep 08, 2006 7:42 am

[solved] cms linker tinymce function menu bug

Post by samplist »

In cmsms version 1.6.7 , 1.6.6 and probably previous versions too there is a small bug in the cms linker tinymce module.
In the menu, when page name is larger than 30 characters, it prints an � character at the end. This happens with utf-8 page names.

The solution to this is:

in file: modules/TinyMCE/TinyMCE.module.php replace following lines:

line 372 
$menutext=htmlspecialchars(substr($menutext,0,30),ENT_QUOTES)." …";
replace with:
$menutext=htmlspecialchars(mb_substr($menutext,0,30,'UTF-8'),ENT_QUOTES)." …";

line 409
$menutext=htmlspecialchars(mb_substr($menutext,0,30),ENT_QUOTES)." …";
replace with:
$menutext=htmlspecialchars(mb_substr($menutext,0,30,'UTF-8'),ENT_QUOTES)." …";

Hope this helps someone.

Is there any place that i can report such small bugs so that they can be fixed in next releases?

Thanks.
Post Reply

Return to “Developers Discussion”