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

html breaking standards in m27/admin/tool/behat/renderer.php

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test 1

      • Go to admin/tool/behat/index.php
      • Check that you can properly see the info box
      • Check that the HTML is not breaking

      Test 2

      • All behat tests should pass
      Show
      Test 1 Go to admin/tool/behat/index.php Check that you can properly see the info box Check that the HTML is not breaking Test 2 All behat tests should pass
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-45156_master

      Description

      The code:

              // List of steps.
              $html .= $this->output->box_start();
              $html .= html_writer::tag('h1', get_string('infoheading', 'tool_behat'));
              $html .= html_writer::tag('div', get_string('aim', 'tool_behat'));
              $html .= html_writer::empty_tag('div');
              $html .= html_writer::empty_tag('ul');
              $html .= html_writer::empty_tag('li');
              $html .= implode(html_writer::end_tag('li') . html_writer::empty_tag('li'), $infos);
              $html .= html_writer::end_tag('li');
              $html .= html_writer::end_tag('ul');
              $html .= html_writer::end_tag('div');
              $html .= $this->output->box_end();
      

      in m27/admin/tool/behat/renderer.php generates an invalid html.

      It should be changed, for instance, to:

              // List of steps.
              $html .= $this->output->box_start();
              $html .= html_writer::tag('h1', get_string('infoheading', 'tool_behat'));
              $html .= html_writer::tag('div', get_string('aim', 'tool_behat'));
              $html .= html_writer::start_tag('div');
              $html .= html_writer::start_tag('ul');
              foreach ($infos as $info) {
                  $html .= html_writer::tag('li', $info);
              }
              $html .= html_writer::end_tag('ul');
              $html .= html_writer::end_tag('div');
              $html .= $this->output->box_end();
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14