-
Bug
-
Resolution: Fixed
-
Major
-
4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.2.1
-
2
-
Team Hedgehog 2023 Sprint 3.2
Steps to reproduce
Using the ATTO text editor
Create Glossary entry: concept: pâté
definition: a soft food, usually made of meat or fish, that you spread on bread, etc.
Create a test page with text: I had liver pâté for lunch.
Check that the word "pâté" is correctly linked to the Glossary entry for pâté.
Now switch to the TinyMCE editor
Purge caches
Edit the text in the test page to :
I had liver pâté for lunch. It was lovely.
Save and display: the link for the word "pâté" is no longer active.
Edit the test page again, in the TinyMCE editor click Tools | Source code
you can see: <p>I had liver pâté for lunch. It was lovely.</p>
The characters with diacritics have been converted to their html entities... the result is that the Glossary links will no longer work!
Provisional hack to solve this:
If you have the necessary capabilities on your Moodle site, go to file:
MYMOODLE\lib\editor\tiny\js\tinymce\tinymce.js
go to line 6665
replace: default: 'named'
with: default: 'raw'
save tinymce.js
Purge caches
Edit the test page again, in the TinyMCE editor click Tools | Source code
you can see that the characters with diacritics are displayed correctly:
<p>I had liver pâté for lunch. It was lovely.</p>
Save the test page and check that the glossary link to the word "pâté" has been restored.
Remarks
This bug in TinyMCE may have gone un-noticed when TinyMCE was implemented because there almost no diactitics in English, the glossary activity is not widely used, or it so happens that not many words with diacritics in other languages have been entered as "concept" in the Glossary.
This bug has just been mentioned on the French-speakingn forum at https://moodle.org/mod/forum/discuss.php?d=448623
and I have provided the hack mentioned above (in a different place in the tinymce.js script at first). This must be considered a serious bug, since there are many words with diacritics in most European languages, and of course in the case of the Greek language it makes the Glossary completely non-functional when using TinyMCE.
Obviously a better solution than my hack must be found.
I have found quite a few posts on the Internet complaining about the fact that TinyMCE has
registerOption('entity_encoding',
);
default set as 'named' rather than 'raw'
Also, it must be investigated if setting raw instead of raw has unwanted consequences in other parts of using TinyMCE on a Moodle site.