Skip to content

Commit

Permalink
Merge pull request #714 from geonetwork/backport/706-to-2.0.x
Browse files Browse the repository at this point in the history
[Backport 2.0.x] fix(DH): Prevent XSS attacks
  • Loading branch information
jahow authored Dec 7, 2023
2 parents 25175f1 + 9045af5 commit bb9fb58
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<gn-ui-content-ghost ghostClass="h-32" [showContent]="fieldReady('abstract')">
<p
class="whitespace-pre-line break-words"
[innerHTML]="metadata.abstract | safe: 'html'"
[innerHTML]="metadata.abstract"
*ngIf="metadata.abstract"
></p>
</gn-ui-content-ghost>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
alt="thumbnail"
loading="lazy"
(load)="setObjectFit()"
[src]="imgUrl | safe: 'url'"
[src]="imgUrl"
(error)="useFallback()"
/>
</div>
1 change: 1 addition & 0 deletions libs/util/shared/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from './lib/util-shared.module'
export * from './lib/services'
export * from './lib/utils/'
export * from './lib/links'
export * from './lib/image-fallback.directive'
36 changes: 0 additions & 36 deletions libs/util/shared/src/lib/pipes/SafePipe.ts

This file was deleted.

5 changes: 2 additions & 3 deletions libs/util/shared/src/lib/util-shared.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { NgModule } from '@angular/core'
import { SafePipe } from './pipes/SafePipe'
import { CommonModule } from '@angular/common'
import { ImageFallbackDirective } from './image-fallback.directive'

@NgModule({
declarations: [SafePipe, ImageFallbackDirective],
declarations: [ImageFallbackDirective],
imports: [CommonModule],
exports: [SafePipe, ImageFallbackDirective],
exports: [ImageFallbackDirective],
})
export class UtilSharedModule {}

0 comments on commit bb9fb58

Please sign in to comment.