Moodle

stop using span tag for nolink and lang, use the original custom moodle tags

Details

  • Type: Task Task
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.9
  • Fix Version/s: DEV backlog
  • Component/s: HTML Editor
  • Labels:
  • Affected Branches:
    MOODLE_19_STABLE

Description

The problem is that <span>s can not be nested - both because you can not have divs in spans and also it is later impossible to find the matching </span>

The reason for those unfortunate <span class="nolink"> and <span class="lang"> was that html editor did not support custom tags, this is not a cane anymore in tinymce of fckeditor.

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

Along with this, it would be nice if the filtering system broke up the texts into "linking" and "nolinking" chunks before sending them to the filters, so that the nolink tag always works for all filters.

I guess to be correct for this we need to do either one of these:

1) have all filters declare that they are "linking" type filters or not, so that we just apply to these.
2) change the tag name to "nofilter" and support "nolink" as a undocumented alternative for backward compatibility.

Show
Martin Dougiamas added a comment - Along with this, it would be nice if the filtering system broke up the texts into "linking" and "nolinking" chunks before sending them to the filters, so that the nolink tag always works for all filters. I guess to be correct for this we need to do either one of these: 1) have all filters declare that they are "linking" type filters or not, so that we just apply to these. 2) change the tag name to "nofilter" and support "nolink" as a undocumented alternative for backward compatibility.
Hide
Martin Dougiamas added a comment -

Suggested syntax:

<nofilter except="mediaplugin multilang"> .... </nofilter>

Show
Martin Dougiamas added a comment - Suggested syntax: <nofilter except="mediaplugin multilang"> .... </nofilter>
Hide
Petr Škoda (skodak) added a comment -

Actually David proposed a lot better solution: use <nolinkstart />xxx<nolinkend /> - the reason is html purifier and tinymce can handle both span and div correctly - otehrwise the strict nesting rules are going to keep breaking everything....

Show
Petr Škoda (skodak) added a comment - Actually David proposed a lot better solution: use <nolinkstart />xxx<nolinkend /> - the reason is html purifier and tinymce can handle both span and div correctly - otehrwise the strict nesting rules are going to keep breaking everything....

People

Vote (3)
Watch (4)

Dates

  • Created:
    Updated: