Trimmed Formatter no work with html code space.

Created on 13 December 2016, over 7 years ago
Updated 28 February 2024, 4 months ago

Problem/Motivation

Summary or trimmed setting is cutting off at periods. When using long paragraphs with periods for Dr. (for example) it's cut off early.

Steps to reproduce

Create a node with the text from the original issue
View the page in the teaser
Verify it's cut off at Dr.

Proposed resolution

TBD

Remaining tasks

Figure out a solution
Write tests
Review
Commit

User interface changes

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

Original Post

I have a text in the body field trimmed to 600 characters in the tesaer view:
<p>Dr. Cras ultricies ligula sed magna dictum porta.&nbsp;Curabitur non nulla sit amet nisl tempus convallis quis ac lectus.&nbsp;Pellentesque in ipsum id orci porta dapibus.&nbsp;Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui.&nbsp;Nulla porttitor accumsan tincidunt.&nbsp;Cras ultricies ligula sed magna dictum porta.&nbsp;Nulla quis lorem ut libero malesuada feugiat.&nbsp;Proin eget tortor risus.&nbsp;Curabitur non nulla sit amet nisl tempus convallis quis ac lectus.&nbsp;Proin eget tortor risus.&nbsp;Praesent sapien massa, convallis a pellentesque nec, egestas non nisi.&nbsp;Vivamus suscipit tortor eget felis porttitor volutpat. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Curabitur aliquet quam id dui posuere blandit. Curabitur aliquet quam id dui posuere blandit. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Pellentesque in ipsum id orci porta dapibus.</p>

I am getting a teaser trimmed:
Dr.

I think the problem is .&nbsp;, if I removed this, the trimmed is fine, there is a drupal solution for not removed all the html code space in my site?

I try fixed adding '&nbsp;'=> 1 here, but no works.

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Textย  โ†’

Last updated 9 days ago

Created by

๐Ÿ‡ณ๐Ÿ‡ฎNicaragua edysmp Nicaragua

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.69.0 2024