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

ckEditor injects an extraneous line-break (<br />) in empty fields

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.5
    • Fix Version/s: 3.1.6, 3.2
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      If you save any form that was a WYSIWYG field when editor = ckEditor, if the field is empty - the saved column has '<br />' added to it. This causes problems like "empty" help blocks in Profiles and Custom Field Sets.

      Lobo's suggestion was to add a filter to the addWysiwyg() function which uses the same method Piotr has implemented for CRM-6224 to check whether an HTML formatted string has any content other than line or paragraph breaks. This would be called on save for any WYSIWYG field, and clean up these extraneous characters.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                priya Priya Prajapati
                Reporter:
                dgg David Greenberg
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified