Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Affected Branches:
      MOODLE_23_STABLE
    • Rank:
      42660

      Description

      There's a suprisingly widespread use of br tags in Moodle to create paragraph spacing. These should be replaced with simple paragraph tags for paragraphs or occasionally ul or li items for lists of text, or simply padding and margin for other spacing effects such as between the icons at the side of sections in courses.

      You can see some of the uses by running: grep \<br lang/en/*.php and there's probably more in the code.

      It's pretty hard to style br tags across browsers, but something like the below in a theme file should work to make their presence obvious by making them about 10 times larger than usual:

      br
      { content: "A" !important;
      display: block !important;
      margin-bottom: 10em !important;
      }

        Issue Links

          Activity

          Hide
          Helen Foster added a comment -

          David, thanks for your report. I've just removed a ton of br tags from the en_fix lang pack, though there are many more, so I'll leave this issue open for now.

          Show
          Helen Foster added a comment - David, thanks for your report. I've just removed a ton of br tags from the en_fix lang pack, though there are many more, so I'll leave this issue open for now.
          Hide
          Helen Foster added a comment -

          Just noting David Mudrak's answer to the question 'Are br tags are acceptable in lang strings?'

          Yes they are. However, in _help and _desc strings, they are not needed (and thence are discouraged). Some of them are legacy, copied over from help files, some of them are caused by devs not being aware of the implicit Markdown formatting.
          A line break without a new paragraph is considered as a bad typography style.

          Show
          Helen Foster added a comment - Just noting David Mudrak 's answer to the question 'Are br tags are acceptable in lang strings?' Yes they are. However, in _help and _desc strings, they are not needed (and thence are discouraged). Some of them are legacy, copied over from help files, some of them are caused by devs not being aware of the implicit Markdown formatting. A line break without a new paragraph is considered as a bad typography style.

            People

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

              Dates

              • Created:
                Updated: