Trim length not respected if HTML contains trailing whitespace

Created on 19 April 2023, about 1 year ago

The TruncateHTML::truncateChars() method seems to unnecessary trim the HTML if it has trailing whitespace that causes it to exceed the character limit.

e.g.

<p>123.</p>\r\n

Is trimmed to following string if you apply a trim length of 4:

<p>123</p>

Notice the dot at the end is also removed.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium Matthijs

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

Comments & Activities

Production build 0.69.0 2024