File tree Expand file tree Collapse file tree 2 files changed +25
-13
lines changed
packages/c2pa-wc/src/components/SocialMedia Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "changes" : [
3
+ {
4
+ "packageName" : " c2pa-wc" ,
5
+ "comment" : " Secure social link display" ,
6
+ "type" : " patch"
7
+ }
8
+ ],
9
+ "packageName" : " c2pa-wc"
10
+ }
Original file line number Diff line number Diff line change @@ -72,19 +72,21 @@ export class SocialMedia extends Localizable(LitElement) {
72
72
>
73
73
< div slot ="header "> ${ this . strings [ 'social-media.header' ] } </ div >
74
74
< ul class ="section-social-media-list " slot ="content ">
75
- ${ this . data ?. map (
76
- ( socialAccount ) => html `
77
- < li class ="section-social-media-list-item ">
78
- < a
79
- class ="section-social-media-list-item-link "
80
- href =${ socialAccount [ '@id' ] }
81
- target ="_blank"
82
- >
83
- < cai-icon source ="${ socialAccount [ '@id' ] } "> </ cai-icon >
84
- </ a >
85
- </ li >
86
- ` ,
87
- ) }
75
+ ${ this . data
76
+ ?. filter ( ( account ) => account [ '@id' ] ?. startsWith ( 'http' ) )
77
+ . map (
78
+ ( socialAccount ) => html `
79
+ < li class ="section-social-media-list-item ">
80
+ < a
81
+ class ="section-social-media-list-item-link "
82
+ href =${ socialAccount [ '@id' ] }
83
+ target ="_blank"
84
+ >
85
+ < cai-icon source ="${ socialAccount [ '@id' ] } "> </ cai-icon >
86
+ </ a >
87
+ </ li >
88
+ ` ,
89
+ ) }
88
90
</ ul >
89
91
</ cai-panel-section > ` ;
90
92
}
You can’t perform that action at this time.
0 commit comments