Search code examples
htmlmagentoeditorwysiwyg

Magento greek characters as html entities


I'm building a Magento site and there is an issue with the WYSIWYG editor and Greek characters, they appear as html entities.

If I write:

Ευχαριστούμε

I get:
<p>&Epsilon;&upsilon;&chi;&alpha;&rho;&iota;&sigma;&tau;&omicron;ύ&mu;&epsilon;</p>

Instead of:

<p>Ευχαριστούμε</p>

Is there some way I can fix this?

Thanks :)


Solution

  • If my memory serves me correct, I remember doing this some time ago for chinese symbols. I did a little research and it still appears to be valid so I supplied my code.

    The configuraion file for TinyMCE is located here: [Magentorootdir]/js/mage/adminhtml/wysiwyg/tiny_mce/setup.js And adding the following line entity_encoding : "raw" as seen below

        var settings = {
            schema : 'html5',
            entity_encoding : "raw",//New Line
            mode : (mode != undefined ? mode : 'none'),
            elements : this.id,
            theme : 'advanced',
            plugins : plugins,
            theme_advanced_buttons1 : magentoPlugins + 'magentowidget,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect',
            theme_advanced_buttons2 : 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,forecolor,backcolor',
            theme_advanced_buttons3 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,ltr,rtl,|,fullscreen',
            theme_advanced_buttons4 : 'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,pagebreak',
            theme_advanced_toolbar_location : 'top',
            theme_advanced_toolbar_align : 'left',
            theme_advanced_statusbar_location : 'bottom',
            theme_advanced_resizing : true,
            convert_urls : false,
            relative_urls : false,
            content_css: this.config.content_css,
            custom_popup_css: this.config.popup_css,
            magentowidget_url: this.config.widget_window_url,
            magentoPluginsOptions: magentoPluginsOptions,
            doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
    

    Documentation found here: http://www.tinymce.com/wiki.php/Configuration:entity_encoding