More link always shows for non-trimmed content when Strip HTML not checked

Created on 14 March 2025, 2 months ago

Problem/Motivation

If HTML encoded elements exist in trimmed field and "Display More link only when content is trimmed?" is checked but "Strip HTML" is not, More link will display even if content is shorter than the defined limit. This is a direct result of this commit done for issue #3108420 πŸ› When format is set to NULL ampersands are double-escaped Fixed .

Steps to reproduce

Create View with Smart Trimmed field with HTML content that includes HTML encoded values. Be sure length of content is less than limit set in Smart Trim formatter.
Select "Display More link?" and "Display More link only when content is trimmed?" and leave "Strip HTML" unchecked.
Results will display "More" link even though content length is less than the defined limit.

Proposed resolution

Address the "#format == NULL" problem defined in issue #3108420 πŸ› When format is set to NULL ampersands are double-escaped Fixed more directly such that it does not affect fields with HTML encoded values. I can't be more specific than that because I don't fully understand the use case of that issue. I will attach a patch file that works for me. Since I don't have the "#format == NULL" use case I can't say that this simple solution is the best approach.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sean_fremouw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024