bug fixed

This commit is contained in:
richard-loafle 2020-02-10 15:42:52 +09:00
parent 1f64a4d428
commit 17f9af17aa
5 changed files with 9 additions and 8 deletions

View File

@ -2,7 +2,7 @@
<div <div
*ngIf="!translationSimpleview || (!!translationSimpleview && !!isMe)" *ngIf="!translationSimpleview || (!!translationSimpleview && !!isMe)"
class="original" class="original"
[innerHTML]="message.sentMessageJson.original | linky | ucapSafeHtml" [innerHTML]="message.sentMessageJson.original | ucapSafeHtml | linky"
(contextmenu)="onContextMenuMessage($event, 'original')" (contextmenu)="onContextMenuMessage($event, 'original')"
></div> ></div>
<div <div
@ -12,7 +12,7 @@
> >
<span class="language">{{ message.sentMessageJson.destLocale }}</span> <span class="language">{{ message.sentMessageJson.destLocale }}</span>
<span <span
[innerHTML]="message.sentMessageJson.translation | linky | ucapSafeHtml" [innerHTML]="message.sentMessageJson.translation | ucapSafeHtml | linky"
> >
</span> </span>
</div> </div>

View File

@ -1,7 +1,7 @@
<div class="bubble-main"> <div class="bubble-main">
<span <span
class="content" class="content"
[innerHTML]="content | linefeedtohtml | linky | ucapSafeHtml" [innerHTML]="content | linefeedtohtml | ucapSafeHtml | linky"
></span> ></span>
<span> <span>
{{ message.sendDate | ucapDate: 'YYYY.MM.DD a hh:mm' }} {{ message.sendDate | ucapDate: 'YYYY.MM.DD a hh:mm' }}

View File

@ -8,7 +8,7 @@
</li> </li>
<li <li
*ngIf="contents" *ngIf="contents"
[innerHTML]="contents | linefeedtohtml | linky | ucapSafeHtml" [innerHTML]="contents | linefeedtohtml | ucapSafeHtml | linky"
></li> ></li>
</ul> </ul>
</div> </div>

View File

@ -1,3 +1,3 @@
<div class="bubble-main"> <div class="bubble-main">
<span [innerHTML]="message.sentMessage | linky | ucapSafeHtml"></span> <span [innerHTML]="message.sentMessage | ucapSafeHtml | linky"></span>
</div> </div>

View File

@ -7,8 +7,9 @@ export class SafeHtmlPipe implements PipeTransform {
constructor(private domSanitizer: DomSanitizer) {} constructor(private domSanitizer: DomSanitizer) {}
public transform(value: string) { public transform(value: string) {
return this.domSanitizer.bypassSecurityTrustHtml( // return this.domSanitizer.bypassSecurityTrustHtml(
StringUtil.escapeHtml(value) // StringUtil.escapeHtml(value)
); // );
return StringUtil.escapeHtml(value);
} }
} }