博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
this.sanitizer.bypassSecurityTrustResourceUrl(url) & WARNING: sanitizing unsafe style value url
阅读量:7050 次
发布时间:2019-06-28

本文共 681 字,大约阅读时间需要 2 分钟。

hot3.png

https://stackoverflow.com/questions/38593515/warning-sanitizing-unsafe-style-value-url

https://github.com/angular/angular/issues/13849

https://github.com/ionic-team/ionic/issues/7552

 

import { Pipe, PipeTransform } from '@angular/core';import {DomSanitizer} from '@angular/platform-browser';@Pipe({ 	name: 'trustAsResourceUrl' })export class TrustAsResourceUrlPipe implements PipeTransform {	constructor(private sanitizer:DomSanitizer){}	transform(url:string) {		//let sanitizedUrl = this.sanitizer.bypassSecurityTrustUrl(url);		//		let sanitizedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url);		return sanitizedUrl;	}}

 

 

 

转载于:https://my.oschina.net/yizhichao/blog/1528896

你可能感兴趣的文章
jq实现全选或者全不选
查看>>
牛人博客
查看>>
linux笔记_20150825_linux有什么好处
查看>>
各种实用工具的使用 学习
查看>>
MarkLight
查看>>
显示/隐藏Mac下的隐藏文件
查看>>
聚集索引与二级索引
查看>>
关于数字签名简要原理
查看>>
POJ-3565 Ants 空间点对不相交匹配-最小权值匹配
查看>>
第三次月考
查看>>
单例模式的理解与应用
查看>>
springmvc(一)
查看>>
Hibernate与 MyBatis的比较
查看>>
【51NOD-0】1137 矩阵乘法
查看>>
Android使用静默安装时碰见的问题
查看>>
MySQL单机多实例安装并配置主从复制
查看>>
awk调用shell命令的两种方法:system与print
查看>>
网络对抗技术 20164320 王浩 Exp 9 Web安全基础
查看>>
谷歌开源第二代机器学习系统 TensorFlow
查看>>
juqery模板 Templates
查看>>