Fix | Promo view excerpt renders limited HTML #848
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reason for Change
The promo-view template does not render HTML in the excerpt field. However, the grid-item, list-item, and spotlight component's excerpts allow some HTML for formatting job titles, quotes, or adding emphasis. Since these components have the option to display the promo with the promo-view template, the excerpt needs to support the same functionality.
The promo grid-item and list-item excerpt fields have been updated to the same allow list as the spotlight component. Line break has been included in the allow list for cases where the individual has multiple job titles and needs them displayed on separate lines.
Resources to review for consistency:
Spotlight component:
https://github.com/waynestate/base-site/blob/master/resources/views/components/spotlight-row.blade.php#L20
Promo grid item:
https://github.com/waynestate/base-site/blob/master/resources/views/components/spotlight-row.blade.php#L20
Promo list item:
https://github.com/waynestate/base-site/blob/master/resources/views/components/promo/list-item.blade.php#L35
Profile template (line break example):
https://github.com/waynestate/base-site/blob/master/resources/views/components/profile.blade.php#L10
Demo / Context
Basecamp: https://3.basecamp.com/5750155/buckets/37389969/todos/9407952665
No visual change when HTML is not used
When HTML is used
Final Checklist