Moodle
  1. Moodle
  2. MDL-33712

Avoid cleaning old <lang> and <nolink> tags in TinyMCE editor

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.9, 2.1.6, 2.2.3, 2.3
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Filters
    • Labels:
    • Testing Instructions:
      Hide

      1/ try adding lang and nolink tags to tinymce in teacher area
      2/ try adding lang and nolink tags to tinymce in teacher area
      3/ it is expected that the tags are not changes on save or when switching editor view
      4/ try different browsers

      note: both nolink and lang tags are considered to be DIVs, so expect problems when nesting in SPANs

      Show
      1/ try adding lang and nolink tags to tinymce in teacher area 2/ try adding lang and nolink tags to tinymce in teacher area 3/ it is expected that the tags are not changes on save or when switching editor view 4/ try different browsers note: both nolink and lang tags are considered to be DIVs, so expect problems when nesting in SPANs
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w28_MDL-33712_m24_extratags
    • Rank:
      41719

      Description

      Apart from any other issue about new syntaxes, problems for the multilang filter... like these:

      http://tracker.moodle.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=%28summary+%7E+%22%2Bfilter+%2Bmultilang%22+OR+description+%7E+%22%2Bfilter+%2Bmultilang%22+OR+comment+%7E+%22%2Bfilter+%2Bmultilang%22%29+AND+resolution+%3D+Unresolved+AND+project+%3D+Moodle+ORDER+BY+updated+ASC

      Right now any <lang> (and probably <nolink>) tags in one text are being deleted by the html editor (and perhaps also by the purifier).

      So this issue is exclusively about to allow them if $CFG->filter_multilang_force_old is enabled. Sort of pass-thought both in the editor and purifier.

      Ciao

        Activity

        Hide
        Petr Škoda added a comment -

        Note: this applies only to editors with XSS cleaning (students), editors for labels or resources work fine already (teachers).

        Show
        Petr Škoda added a comment - Note: this applies only to editors with XSS cleaning (students), editors for labels or resources work fine already (teachers).
        Hide
        Petr Škoda added a comment -

        to integrators: feel free to backport to stable

        Show
        Petr Škoda added a comment - to integrators: feel free to backport to stable
        Hide
        Petr Škoda added a comment -

        updating title, HTMLPurifier already knows about our unique tags

        Show
        Petr Škoda added a comment - updating title, HTMLPurifier already knows about our unique tags
        Hide
        Dan Poltawski added a comment -

        Taking integration held issues out of integration (whilst we are keeping master and 23_STABLE in sync).

        Show
        Dan Poltawski added a comment - Taking integration held issues out of integration (whilst we are keeping master and 23_STABLE in sync).
        Hide
        Dan Poltawski added a comment -

        In eloys comment he says 'So this issue is exclusively about to allow them if $CFG->filter_multilang_force_old is enabled.', but it looks like you are allowing it always. Should this be conditional?

        (Also, to be exact, this change is fine for 2.2 too?)

        Show
        Dan Poltawski added a comment - In eloys comment he says 'So this issue is exclusively about to allow them if $CFG->filter_multilang_force_old is enabled.', but it looks like you are allowing it always. Should this be conditional? (Also, to be exact, this change is fine for 2.2 too?)
        Hide
        Petr Škoda added a comment -

        Hello, I copied the logic from htmlpurifier cleaning, I think we should do enable it always.

        Show
        Petr Škoda added a comment - Hello, I copied the logic from htmlpurifier cleaning, I think we should do enable it always.
        Hide
        Dan Poltawski added a comment -

        Integrated to 22/23 and master.

        Show
        Dan Poltawski added a comment - Integrated to 22/23 and master.
        Hide
        Rajesh Taneja added a comment -

        Works great,

        Thanks for fixing this, Petr.

        Show
        Rajesh Taneja added a comment - Works great, Thanks for fixing this, Petr.
        Hide
        Dan Poltawski added a comment -

        Congratulations!

        You've made it into the weekly release!

        Thanks for your contribution - here are some random drummers to keep you inspired for the next week!
        http://www.youtube.com/watch?v=_QhpHUmVCmY

        Show
        Dan Poltawski added a comment - Congratulations! You've made it into the weekly release! Thanks for your contribution - here are some random drummers to keep you inspired for the next week! http://www.youtube.com/watch?v=_QhpHUmVCmY

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: