Moodle
  1. Moodle
  2. MDL-4330

<span class="nolink"> does not work properly in all cases

    Details

    • Type: Bug Bug
    • Status: Development in progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.3, 2.0.2, 2.4
    • Fix Version/s: STABLE backlog
    • Component/s: Filters
    • Labels:
    • Affected Branches:
      MOODLE_15_STABLE, MOODLE_20_STABLE, MOODLE_24_STABLE

      Description

      But in some cases I wanted to avoid the filter to be sure that, to see the video related to a text, will be just a student's option.

      I found this way to do this :

      To insert in html editor, in html format the classic javascript:void(window.open.. etc,

      for exemple this one ...

      <a href=javascript:void(window.open('http://www.myweb.conm/file.wmv', '', 'resizable=no,scrollbars=yes,status=no,width=620,height=420,top=10,left=10,statusbar=0,menubar=0,location=0'))>Text to be displayed</a>

      will open file.wmv in windows media player.

      But this method is not easy, there could be some alternative ?

        Gliffy Diagrams

        1. MDL-4330.patch
          4 kB
          Nicolas Connault

          Issue Links

            Activity

            Hide
            Martin Dougiamas added a comment -

            From Martin Dougiamas (martin at moodle.com) Wednesday, 16 November 2005, 10:03 AM:

            Insert these tags

            <span class=nolink> ... </span>

            From Howard Miller (howard.miller at udcf.gla.ac.uk) Thursday, 6 July 2006, 10:11 PM:

            as no objection to MD's solution, closing.

            Show
            Martin Dougiamas added a comment - From Martin Dougiamas (martin at moodle.com) Wednesday, 16 November 2005, 10:03 AM: Insert these tags <span class=nolink> ... </span> From Howard Miller (howard.miller at udcf.gla.ac.uk) Thursday, 6 July 2006, 10:11 PM: as no objection to MD's solution, closing.
            Hide
            Michael Blake added a comment -

            From Jonathan Moore

            Martin's suggestion that resulted in the issue being closed doesn't in
            fact work (I have tested in every version except for 1.7 from 1.6-1.9).

            Show
            Michael Blake added a comment - From Jonathan Moore Martin's suggestion that resulted in the issue being closed doesn't in fact work (I have tested in every version except for 1.7 from 1.6-1.9).
            Hide
            Martin Dougiamas added a comment -

            Nicolas, can you please test <span class="nolink"> </span> in various texts around Moodle 1.9 and 1.8 and fix if it's broken?

            A good way to test would be to enable the multimedia filter and the glossary filter, then put links to .mp3 files in your texts as well as words from the glossary.

            Show
            Martin Dougiamas added a comment - Nicolas, can you please test <span class="nolink"> </span> in various texts around Moodle 1.9 and 1.8 and fix if it's broken? A good way to test would be to enable the multimedia filter and the glossary filter, then put links to .mp3 files in your texts as well as words from the glossary.
            Hide
            Martin Dougiamas added a comment - - edited

            Nick have you tested these?

            Show
            Martin Dougiamas added a comment - - edited Nick have you tested these?
            Hide
            Ken Wilson added a comment -
            Show
            Ken Wilson added a comment - Re-openning. Please see http://moodle.org/mod/forum/discuss.php?d=95465 .
            Hide
            Petr Skoda added a comment -

            Reclosing, tested - it works as expected - it does not work when you nest divs though, this is a known problem (see MDL-15555).

            thanks for the report

            Show
            Petr Skoda added a comment - Reclosing, tested - it works as expected - it does not work when you nest divs though, this is a known problem (see MDL-15555 ). thanks for the report
            Hide
            Samuli Karevaara added a comment -

            Reopening. I upgraded to Moodle 1.9.3+ (Build: 20081024) but can't get the nolink-functionality to work. I have this as a web page, nothing else on the page:

            <span class="nolink">This <a href="http://moodle.example.com/file.php/6/multimedia/FranklinVanUden-FirstBloodPartII.mp3">link</a> is nolinked.</span>

            but still the flash player shows up. I tried different places for the span tag, but nothing worked.

            (I wonder if the tracker eats the html formatting)

            Show
            Samuli Karevaara added a comment - Reopening. I upgraded to Moodle 1.9.3+ (Build: 20081024) but can't get the nolink-functionality to work. I have this as a web page, nothing else on the page: <span class="nolink">This <a href="http://moodle.example.com/file.php/6/multimedia/FranklinVanUden-FirstBloodPartII.mp3">link</a> is nolinked.</span> but still the flash player shows up. I tried different places for the span tag, but nothing worked. (I wonder if the tracker eats the html formatting)
            Hide
            Tim Hunt added a comment -

            Adjusting bogus fix version.

            Show
            Tim Hunt added a comment - Adjusting bogus fix version.
            Hide
            Tim Hunt added a comment -

            This is basically a duplicate of the more general MDL-7336.

            Show
            Tim Hunt added a comment - This is basically a duplicate of the more general MDL-7336 .
            Hide
            Tim Hunt added a comment -

            Oh, I see, but this bug has evolved into the issue of making <span class="nolink"> work properly in all cases, so I should not resolve this as a duplicate.

            Show
            Tim Hunt added a comment - Oh, I see, but this bug has evolved into the issue of making <span class="nolink"> work properly in all cases, so I should not resolve this as a duplicate.
            Hide
            Nicolas Connault added a comment -

            I attached a patch with a partial solution. It will apply the nolink effect on any <a...> tag immediately preceded by <span class="nolink">

            This means that
            <span class="nolink"><a href="test.mp3">my music</a></span
            will bypass the mediaplugin filter

            but
            <span class="nolink">my <a href="test.mp3">music</a></span
            will not work, because there are characters between the <span> and <a> tags

            Here is a sample HTML you can enter in a web page resource to test all the supported media plugins:
            http://paste.dollyfish.net.nz/61871c (The mp3 file actually exists, enjoy!)

            Show
            Nicolas Connault added a comment - I attached a patch with a partial solution. It will apply the nolink effect on any <a...> tag immediately preceded by <span class="nolink"> This means that <span class="nolink"><a href="test.mp3">my music</a></span will bypass the mediaplugin filter but <span class="nolink">my <a href="test.mp3">music</a></span will not work, because there are characters between the <span> and <a> tags Here is a sample HTML you can enter in a web page resource to test all the supported media plugins: http://paste.dollyfish.net.nz/61871c (The mp3 file actually exists, enjoy!)
            Hide
            Nicolas Connault added a comment -

            Delaying until 2.0

            Show
            Nicolas Connault added a comment - Delaying until 2.0
            Hide
            Myles Carrick added a comment -

            I've applied a change using the same technique as the keyword/phrase-based filters use - rather than hacking the regexes we just remove everything between the nolink boundaries (using the existing filter_save_ignore_tags function), apply the filter, then replace the content.
            https://github.com/mylescarrick/moodle/compare/MOODLE_20_STABLE...MDL-4330

            Show
            Myles Carrick added a comment - I've applied a change using the same technique as the keyword/phrase-based filters use - rather than hacking the regexes we just remove everything between the nolink boundaries (using the existing filter_save_ignore_tags function), apply the filter, then replace the content. https://github.com/mylescarrick/moodle/compare/MOODLE_20_STABLE...MDL-4330
            Hide
            Helen Foster added a comment -

            Myles, thanks for your patch. Setting a fix version of DEV backlog for this improvement to be considered for 2.1.

            Show
            Helen Foster added a comment - Myles, thanks for your patch. Setting a fix version of DEV backlog for this improvement to be considered for 2.1.
            Hide
            Tim Lock added a comment -

            Hi All,

            How can we progress this issue?

            Show
            Tim Lock added a comment - Hi All, How can we progress this issue?
            Hide
            Helen Foster added a comment -

            Adding 2.4 as affected version as this remains a problem as reported in the discussion https://moodle.org/mod/forum/discuss.php?d=218330

            Show
            Helen Foster added a comment - Adding 2.4 as affected version as this remains a problem as reported in the discussion https://moodle.org/mod/forum/discuss.php?d=218330
            Hide
            Nadav Kavalerchik added a comment -

            Could also be useful if we could wrap specific .swf links with these tags to prevent the multimedia filter from parsing them and converting them into SWF players.

            Show
            Nadav Kavalerchik added a comment - Could also be useful if we could wrap specific .swf links with these tags to prevent the multimedia filter from parsing them and converting them into SWF players.

              People

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

                Dates

                • Created:
                  Updated: