voyager icon indicating copy to clipboard operation
voyager copied to clipboard

Fix BREAD rich text display issue

Open ModulesSoft opened this issue 1 year ago • 1 comments

Pull Request: Fix Showing HTML Elements and HTML Entities in BREAD views

Description

This pull request resolves the issue where HTML tags and entities were returned for rich-text values by the 'index', 'show', 'order', and 'relation' BREAD methods, as well as a fix for values displayed in relationship.blade for better 'edit' view. 🛠️ The problem led to an unformatted and confusing user experience. 🔍

Changes Made

  • Added stripTagsFromObject(), and stripTagsFromCollection() methods to VoyagerBaseController class.
  • Called the mentioned methods in the 'index', 'show', 'order', and 'relation' methods for $dataTypeContent.
  • Added strip_tags() and html_entity_decode() PHP methods to the values in the relationship.blade view for the remaining unformatted data being shown.
  • Finally, ensured that HTML elements and entities are now displayed as rendered content, improving the user experience. ✨👀

How to Test

  1. Navigate to a page with a rich text field (of itself or its relations) in browse, order, show, etc. views.
  2. Verify that HTML tags and entities are now removed, rather than being displayed as raw code.
  3. Confirm that the rich text content appears as intended and is easy to read.

Additional Notes

This fix enhances the user experience by ensuring that rich text preview is correctly displayed in BREAD views. Your review and feedback are highly appreciated. 🙏

ModulesSoft avatar Feb 18 '24 07:02 ModulesSoft

Following is a snapshot of the problem for one case.

Screenshot 2024-03-16 at 8 50 24 AM

ModulesSoft avatar Mar 16 '24 14:03 ModulesSoft