Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-7261

note truncation issues when line breaks present

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.3.2
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      templates/CRM/Contact/Page/View/Note.tpl
      change line 250 to: {$note.note|mb_truncate:80:"...":false|nl2br}

      currently, if the note contains line breaks (which are converted to html break tags), the truncation can happen in the middle of the tag, which breaks the "more" link. see: http://drupal.demo.civicrm.org/civicrm/contact/view?action=browse&selectedChild=note

      the above change processes the truncation before change line breaks to br, and doesn't allow a break mid-word. this ensures better processing (and is more in sync with the use of count_characters later in the file)

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              lcdweb Brian Shaughnessy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: