Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
quanpham-axonivy committed Dec 26, 2024
1 parent d777f4e commit 1f51341
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ export class ProductDetailComponent {
md.use(MarkdownItGitHubAlerts);
md.use(full); // Add emoji support
const result = md.render(value);
this.sanitizer.sanitize(SecurityContext.HTML, result);
return this.sanitizer.bypassSecurityTrustHtml(result);
const safeHTML = this.sanitizer.sanitize(SecurityContext.HTML, result);
return safeHTML ? this.sanitizer.bypassSecurityTrustHtml(safeHTML) : '';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class ReleasePreviewComponent {
const md = MarkdownIt();
md.use(full);
const result = md.render(value);
this.sanitizer.sanitize(SecurityContext.HTML, result);
return this.sanitizer.bypassSecurityTrustHtml(result);
const safeHTML = this.sanitizer.sanitize(SecurityContext.HTML, result);
return safeHTML ? this.sanitizer.bypassSecurityTrustHtml(safeHTML) : '';
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HttpClient } from '@angular/common/http';
import { inject, Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
import { ReleasePreviewData } from '../../shared/models/release-preview-data.model';
@Injectable({
Expand Down
2 changes: 1 addition & 1 deletion marketplace-ui/src/assets/i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ common:
title: Product Release Preview
description: Preview your product's details
buttonLabel: Upload
noTabs: Seem like there's a problem with your Zip file.
noTabs: Seems like there's a problem with your Zip file.
hint: Only .zip file is allowed and file size should be smaller than 20MB.
link: See how to configure a valid README.
hintContent: <p>
Expand Down

0 comments on commit 1f51341

Please sign in to comment.