Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33712

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

    Details

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

      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

        Gliffy Diagrams

          Activity

          Hide
          skodak Petr Skoda added a comment -

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

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

          to integrators: feel free to backport to stable

          Show
          skodak Petr Skoda added a comment - to integrators: feel free to backport to stable
          Hide
          skodak Petr Skoda added a comment -

          updating title, HTMLPurifier already knows about our unique tags

          Show
          skodak Petr Skoda added a comment - updating title, HTMLPurifier already knows about our unique tags
          Hide
          poltawski Dan Poltawski added a comment -

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

          Show
          poltawski Dan Poltawski added a comment - Taking integration held issues out of integration (whilst we are keeping master and 23_STABLE in sync).
          Hide
          poltawski 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
          poltawski 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
          skodak Petr Skoda added a comment -

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

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

          Integrated to 22/23 and master.

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

          Works great,

          Thanks for fixing this, Petr.

          Show
          rajeshtaneja Rajesh Taneja added a comment - Works great, Thanks for fixing this, Petr.
          Hide
          poltawski 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
          poltawski 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:
                Fix Release Date:
                10/Sep/12