Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-26515

Trim <p> tags to avoid excess whitespace in FF options display

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.5.0, 2.6.0
    • Component/s: Polls
    • Labels:
      None
    • Previous Issue Keys:
      SAK-11882, POLL-3

      Description

      The Rich Text editor wraps a single line of text in <p> tags, with the result that Firefox shows a list of poll options with excessive whitespace above and below in both the voting and results pages (see screenshot).

      <p> tags inside table cells is also invalid html strictly speaking, e.g.

      <td valign="middle"><input value="1" type="radio" name="optionform-selection"/></td><td ><span ><p>One</p></span></td>

      To avoid this for simple cases, apply the following algorithm to poll option text submitted from the RT editor:

      (remove trailing blank lines)

      • While (optiontext ends with "<p> </p>") remove trailing "<p> </p>".

      (remove a single set of <p> tags)
      if optiontext starts with "<p>" and option text ends with "</p>" and "<p>" occurs only once in the strong, remove leading "<p>" and trailing "</p>" from optiontext.

        Gliffy Diagrams

          Attachments

          1. Polls.png
            Polls.png
            63 kB
          2. screenshot-1.jpg
            screenshot-1.jpg
            135 kB

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                smarquard Stephen Marquard
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code