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

Moodle assign null value to attributes without value inside an HTML tag

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE

      Description

      Using the HTML editor to enter some HTML5 code with attributes. If some attribute has no value then the editor add a null value.

      Trying to add a media player embedded in a page resource.
      Adding this code:

      <audio id="audio1" data-able-player preload="auto">
        <source type="audio/mpeg" src="path_to_audio_file.mp3"/>
      </audio>
      

      data-able-player is the attribute passed inside the audio tag. After save the code, the editor returns:

      <audio id="audio1" data-able-player="" preload="auto"> 
      <source type="audio/mpeg" src="path_to_audio_file.mp3" /> 
      </audio>
      
      

      Moodle add ="" to the attribute data-able-player

        Attachments

          Activity

            People

            Assignee:
            dobedobedoh Andrew Lyons
            Reporter:
            facedo Fernando Acedo
            Participants:
            Component watchers:
            Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: