[arvados] updated: 2.7.0-6574-gda46b2d068

git repository hosting git at public.arvados.org
Thu Apr 25 16:00:25 UTC 2024


Summary of changes:
 .../views-components/project-details-card/project-details-card.tsx    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

       via  da46b2d068f86e75d055f98acbdbb789a4a7712f (commit)
      from  9e82519ebc14c20423cb3eb712ef7581f609dc1f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit da46b2d068f86e75d055f98acbdbb789a4a7712f
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Thu Apr 25 11:59:42 2024 -0400

    21224: fixed html rendering in project description Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
index bcc0199713..b4494ae5ee 100644
--- a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
+++ b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
@@ -274,6 +274,8 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, fro
         setShowProperties(!showProperties);
     };
 
+    const parser = new DOMParser();
+
     return (
         <Card
             className={classes.root}
@@ -339,7 +341,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, fro
                                     data-cy='project-description'
                                     //dangerouslySetInnerHTML is ok here only if description is sanitized,
                                     //which it is before it is loaded into the redux store
-                                    dangerouslySetInnerHTML={{ __html: description }}
+                                    dangerouslySetInnerHTML={{ __html: parser.parseFromString(description, 'text/html').body.textContent || ''}}
                                 />
                             </Collapse>
                         </section>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list