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

Blog dashlet should not use substr() to generate the preview

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Important
    • Resolution: Duplicate
    • Affects Version/s: 4.7.12
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      in templates/CRM/Dashlet/Page/Blog.tpl

      <span class="crm-news-feed-item-preview"> - {$article.description|strip_tags|substr:0:100}…</span>

      it can happen that the substr() will cut in the middle of a string. This broke the news feed because of a blog post where the substr() happened in the middle of a "It's" string, where the apostrophe was the MS-word style smart quotes.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mlutfy Mathieu Lutfy
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: