base 64 bug & encodeURIComponent
base64 bug & encodeURIComponent
window.btoa("jëh²H¶�%28");
// "autoskiptoclMjiu"
window.atob("auto skip to corp");
// "jëh²H¶("
window.btoa("jëh²H¶�(");
// "autoskiptocorg=="
// window.atob(encodeURIComponent("auto skip to corp"));
// VM5604:1 Uncaught DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
// at <anonymous>:1:8
// (anonymous) @ VM5604:1
encodeURIComponent("auto skip to corp");
// "auto%20skip%20to%20corp"
decodeURIComponent("auto%20skip%20to%20corp")
"auto skip to corp
vue
autoSkipToDetailsByType(type = ``, id = ``) {
// let uid = this.skipUid;
let text = ``;
let hash = ``;
let title = ``;
// <view id="enterprise"/>
// <view id="enterprise/special-topics"/>
// <view id="enterprise/chain"/>
// <view id="figure/figure-topics"/>
// <view id="data/details"/>
// <view id="newsinfo/iframe"/>
switch (type) {
case "all":
text = `auto skip to all`;
title = "";
hash = `search`;
break;
case "corp":
text = `auto skip to corp`;
title = "";
hash = `enterprise/special-topics`;
break;
case "newsinfo":
text = `auto skip to newsinfo`;
title = "";
hash = `newsinfo/iframe`;
break;
case "chart":
text = `auto skip to chart`;
title = "";
hash = `enterprise/chain`;
break;
case "figure":
text = `auto skip to figure`;
title = "";
hash = `figure/figure-topics`;
break;
case "brand":
text = `auto skip to brand`;
title = "";
hash = `data/details`;
break;
default:
break;
}
if (id && id.length) {
// skip
console.log(text, id);
} else {
id = ``;
}
let url = window.location.origin;
Light.navigate(
`${url}/#/${hash}`,
{
message: window.atob(text),
id,
// id: id,
},
{
title: title,// 公司 / 资讯 / 链谱 / 人物 / 数据
replace: false,
},
);
},
base 64 bug & encodeURIComponent的更多相关文章
- base 64 & blob & image url
base 64 & blob & image url base 64 image & e.clipboardData.items[1] https://codepen.io/x ...
- 快速掌握 Base 64 | 学 Java 密码系列
Java 密码系列 - Java 和 JS Base 64 Base 64 不属于密码技术,仅是编码方式.但由于在 Java.JavaScript.区块链等出现的频率较高,故在本系列文章中首先分享 B ...
- C# base 64图片编码解码
使用WinForm实现了图片base64编码解码的 效果图: 示例base 64编码字符串: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKD ...
- Base 64 编码
原创地址:http://www.cnblogs.com/jfzhu/p/4020097.html 转载请注明出处 (一)Encoding VS. Encryption 很多人都以为编码(Encodin ...
- 浅谈 Data URI 与 BASE 64 编码
前言(废话):鼓捣 Stylish 的时候发现了这么个奇怪的代码行: Data:image/gif;BASE64,R0lGODlhEAAQAKEAAEKF9NPi/AAAAAAAACH5BAEAAAI ...
- base 64 编解码器
base 64 编解码 1. base64的编码都是按字符串长度,以每3个8bit的字符为一组, 2. 然后针对每组.首先获取每一个字符的ASCII编码. 3. 然后将ASCII编码转换成8bit的二 ...
- Base 64 & decodeURIComponent
Base 64 & decodeURIComponent js btoa() & atob() let obj = [{"key":"q",&q ...
- 关于BASE 24 ,BASE 64原理以及实现程序
关于BASE 24 ,BASE 64原理以及实现程序 来源 https://wangye.org/blog/archives/5/ 可能很多人听说过Base64编码,很少有人听说过Base24编码,B ...
- Base 64 & URL & blob & FileReader & createObjectURL
Base 64 & URL & blob & FileReader & createObjectURL /** * let blob = item.getAsFile( ...
随机推荐
- Object level permissions support
django-guardian (1.1.1+) - Object level permissions support. Home - Django REST framework https://ww ...
- Service Mesh 在百度网盘数万后端的落地实践
https://www.infoq.cn/article/vpa6aypkizuqiijzflih
- vuex有哪几种属性
有五种,分别是 State. Getter.Mutation .Action. Modulestate => 基本数据(数据源存放地)getters => 从基本数据派生出来的数据muta ...
- .htaccess 和 .user.ini
.htaccess 仅能用于apache下,并且内容严格,不能有错误行,如:GIF89a .user.ini php 5.3.0开始引入,可设置除了:PHP_INI_SYSTEM 外的其他,包括(PH ...
- docker基本使用-nginx
在docker环境中部署使用nginx 1,安装nginx docker pull nginx 2,随便启动一下nginx,测试是否安装成功 a,启动nginx sudo docker run --n ...
- JavaWeb——Ajax与MVC学习总结
Ajax: 什么是Ajax? 为什么使用Ajax? 使用jquery Ajax实现登录 Ajax实例练习: 设计模式 设计模式的定义: 设计模式的作用: MVC设计模式 MVC设计模式的模块组成: M ...
- sql 工具类function
--判断是否为整数 create or replace function is_number(param VARCHAR2) return NUMBER is v_num NUMBER; begin ...
- this.$nextTick( 回调函数 )的作用
首先要明确几个概念 1.Vue的核心思想 数据驱动 和 组件化系统 2.同步和异步 在没有特殊情下,程序一般先执行同步代码,等待同步执行完之后,执行异步代码 下面进入正题,首先贴出程序片段: 在该段代 ...
- UVA-12304 2D Geometry 110 in 1! (有关圆的基本操作)
UVA-12304 2D Geometry 110 in 1! 该问题包含以下几个子问题 CircumscribedCircle x1 y1 x2 y2 x3 y3 : 三角形外接圆 Inscribe ...
- 2019ICPC南昌邀请赛 Sequence
题意:给出n个点的权值,m次操作,操作为1时为询问,每次询问给出 l 和 r ,求 f(l,r).操作为0时为修改权值.f(l,r)=f(l,l)⊕f(l,l+1)⊕⋯⊕f(l,r)⊕f(l+1,l+ ...