Moodle

Required class="multilang" is not produced by HTML editor

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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)

Activity

Hide
Julien Dehaese added a comment -

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.

Show
Julien Dehaese added a comment - 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.
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
David Mudrak added a comment -

Closing - HTMLArea is the history

Show
David Mudrak added a comment - Closing - HTMLArea is the history

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: