Untrimmed content with single quote shows trimmed suffix

Created on 23 July 2013, over 11 years ago
Updated 9 January 2025, 3 months ago

I was using Smart Trim to trim a certain field to 100 characters, but then I noticed that one of my data entries was getting trimmed even though it was only 80 characters long. I looked into the module, and discovered that the untrimmed text had an encoded single quote in the content, and the trimmed text had decoded the quote, which shortened the content, causing the suffix to appear.

I did some digging, and found that $output2 is put through _filter_htmlcorrector(), but $output isn't before the length check. In my environment, I also put $output through that function, and it solved my problem, but I didn't go through the code enough to know if that's the best possible solution.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States UjuidarEhcram

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024