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

count_words returns too few words when dealing with html tags

XMLWordPrintable

      The problem is strip_tags will join words together:

      <p>Some text</p>
      <p><br/><p>
      <p>Some more text</p>

      How many words ? Moodle thinks it's 4.

      Also count_letters includes the letters in HTML entities - eg &nbsp; is 6 letters.

            timhunt Tim Hunt
            damyon Damyon Wiese
            Jason Platts Jason Platts
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 45 minutes
                45m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.