File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,12 @@ export default class DependencyHit extends React.PureComponent {
8181 const getTagName = ( tags , version ) =>
8282 Object . keys ( tags ) . find ( key => tags [ key ] === version ) ;
8383
84+ const validDescription = description =>
85+ description &&
86+ ! description . includes ( '<' ) &&
87+ ! description . includes ( '>' ) &&
88+ ! description . includes ( '[![' ) ;
89+
8490 return (
8591 < Container highlighted = { highlighted } onClick = { onClick } >
8692 < Left >
@@ -89,7 +95,9 @@ export default class DependencyHit extends React.PureComponent {
8995 < Downloads > { formatDownloads ( hit . downloadsLast30Days ) } </ Downloads >
9096 { hit . license && < License > { hit . license } </ License > }
9197 </ Row >
92- < Description > { hit . description } </ Description >
98+ { validDescription ( hit . description ) && (
99+ < Description > { hit . description } </ Description >
100+ ) }
93101 < Row >
94102 < StyledUserWithAvatar
95103 username = { hit . owner . name }
You can’t perform that action at this time.
0 commit comments