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 27, 2024
1 parent d777f4e commit 07e2e4c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Component,
ElementRef,
HostListener,
SecurityContext,
Signal,
WritableSignal,
computed,
Expand Down Expand Up @@ -462,7 +461,6 @@ 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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ <h3 [lang]="languageService.selectedLanguage()" class="text-secondary">
<div class="container mt-5">
<form (submit)="onSubmit()">
<div class="form-group">
<!-- <label for="fileInput">Choose a zip file:</label> -->
<input
type="file"
id="fileInput"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import {
Signal,
WritableSignal,
computed,
signal,
SecurityContext
signal
} from '@angular/core';
import { FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
Expand All @@ -21,6 +20,7 @@ import { CommonDropdownComponent } from '../../shared/components/common-dropdown
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
import MarkdownIt from 'markdown-it';
import MarkdownItGitHubAlerts from 'markdown-it-github-alerts';
import { full } from 'markdown-it-emoji';
import { DisplayValue } from '../../shared/models/display-value.model';
import { MultilingualismPipe } from '../../shared/pipes/multilingualism.pipe';
Expand Down Expand Up @@ -137,8 +137,8 @@ export class ReleasePreviewComponent {
renderReadmeContent(value: string): SafeHtml {
const md = MarkdownIt();
md.use(full);
md.use(MarkdownItGitHubAlerts);
const result = md.render(value);
this.sanitizer.sanitize(SecurityContext.HTML, result);
return this.sanitizer.bypassSecurityTrustHtml(result);
}
}
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 07e2e4c

Please sign in to comment.