S
S
StrangeAttractor2014-08-04 19:55:42
PHP
StrangeAttractor, 2014-08-04 19:55:42

How to stop PrestaShop from translating diacritical characters in HTML entities?

I am making a Czech online store. In Czech, we have letters with diacritics (superscripts) like Š (Ш), Ž (Ж), Č (Ч), Ý (solid long and, analogous to the Russian "ij" at the end of adjectives), etc. So when I enter these letters in CMS PrestaShop articles, save, and then open the corresponding article, in the code (and I prefer to edit the code, not WYSIWYG), all these letters are replaced with the corresponding HTML entities. For example Š on scaron, Ý on yacute etc. As a result, the source code becomes completely unreadable, it becomes impossible to search for it, and letters instead of a couple of bytes (how many Latin characters with diacritics take in UTF8) begin to occupy all eight.
The fact that only those characters for which the corresponding HTML entities are defined are subjected to transformation, while the rest remain untouched and are saved and displayed without problems, as if hinting at the fact that all this is not necessary at all.
Accordingly, the question is how to get rid of this feature and whether there are any arguments in favor of leaving it.
Raised a question on the official PrestaShop forum , but did not meet with understanding. Maybe someone here can advise.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
StrangeAttractor, 2014-08-04
@StrangeAttractor

The answer was found (answered on the official forum): you need to edit /js/tinymce.inc.js, adding entity_encoding : "raw" to the default_config, something like this:

// safari,pagebreak,style,table,advimage,advlink,inlinepopups,media,contextmenu,paste,fullscreen,xhtmlxtras,preview
  default_config = {
    entity_encoding : "raw", // <- добавляем вот эту строчку сюда
    selector: ".rte" ,

Read more here (official TinyMCE documentation).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question