Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.8.2
-
Fix Version/s: None
-
Component/s: HTML Editor
-
Labels:None
-
Affected Branches:MOODLE_18_STABLE
Description
Since 1.8, the multilang <span> requires class="multilang". However, HTML editor does not produce this code when using multilang GUI.
How to reproduce:
- create a content with HTML editor
- select a text
- set a language of selection by the GUI tool
- switch to HTML source by pressing [<>]
- check it - there is only <span lang="xx"> but there should be <span lang="xx" class="multilang"> (according to http://docs.moodle.org/en/Multi_language_content)
I modified the htmlarea.php within moodle\lib\editor\htmlarea.
I basically replaced
var str = '<span lang="'lang.trim()'"';
if (multiLang) { str += ' class="multilang"'; }
BY
var str = '<span class="multilang" lang="'lang.trim()'"';
//if (multiLang) { // str += ' class="multilang"'; //}
and now the HTML editor correctly uses the multilang tag.