Skip to content

Truncatable part doesn't work correctly in case there is HTML content. #4948

@FrancescoMolinaro

Description

@FrancescoMolinaro

Describe the bug

On some of the customer with customizations we noticed that in case some inline element (e.g. span) is rendered inside the truncatable-part component, with some complex inner html, the calculation for the "Show more" button visibility does not work as expected

To Reproduce

Customize item-search-result-list-element.component.html or adapt it temprarily to accept html for abstract:

@if (firstMetadataValue('dc.description.abstract', false); as abstract) { <div class="item-list-abstract"> <ds-truncatable-part [id]="dso.id" [minLines]="3"><span [innerHTML]="abstract"></span> </ds-truncatable-part> </div> }

Adapt one of the search result abstact to contain some html, e.g.

<div>A large or medium repository, but also a small repository in some special cases, needs to allow a more decentralized management of administrative activities as: creation of new communities, creation of new collections, management of submitter and workflow groups, editing of published items, access policies and so on. Until now, DSpace allows only a partial decentralization of this functionalities thought into the role of COLLECTION ADMIN. After highlighting these needs, we will introduce the new role of COMMUNITY ADMIN and the changes made to the COLLECTION ADMIN role by our patch so to fix most of the previous needs. We will talk about the "long history" of this patch, made for the first time by Andrea against the 1.2 series and next kept updated, bug free and XMLUI aware by Tim from the 1.4 series. This "pass the buck", from Andrea to Tim and again together with some other people, shows how useful is for anyone to share results, experiences and customizations with the community so to get them back improved, reducing the cost of locale maintenance, debug and bug fix. We will close the presentation with the good news of the inclusion of this patch in the DSpace codebase for both XMLUI and JSPUI interfaces and also giving some notices about possible improvements in the next future. <b><a href="https://www.dspace.org" target=_blank>DSpace User Group Meeting 2009</a></b> </div>

You will see that the truncatable is not working:

Image

Expected behavior

The truncatable should work aslo with complex inner html.

Related work

#4949

Metadata

Metadata

Labels

Type

Projects

Status

🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions