角度在%E2%80%8B结尾的Img上添加额外的变量 [英] Angular add extra variable on Img at end %E2%80%8B

查看:61
本文介绍了角度在%E2%80%8B结尾的Img上添加额外的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 http://myimage.png%E2%80%8B

我刚刚复制粘贴了这个img url,但是它在末尾添加了一些奇怪的数据,并且图像未显示.但是在代码上看起来很完美.

I have just copy paste this img url but it added some wiered data on end and image does not show . but on code it looks perfect .

我在Angular中尝试过类似

I have tried something in Angular like

var imageSafeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.imageLink);
this.imageLink = imageSafeUrl['changingThisBreaksApplicationSecurity'];

但仍然会添加

推荐答案

数据经过url编码,因此可以在地址栏中安全键入数据,并由浏览器/服务器对其进行解释

The data is url encoded so it can be typed safely in an address bar and interpreted by the browser/server

%E2 =â
%80 =`
%8B = ‹

%E2 = â
%80 = `
%8B = ‹

可在 https://www.w3schools上获得帮助您解释编码字符的表格..com/tags/ref_urlencode.asp

因此,您已经一起复制了 http://myimage.png ‹‹

So together you have copied http://myimage.pngâ`‹

这篇关于角度在%E2%80%8B结尾的Img上添加额外的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆