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( ...
随机推荐
- Turbo Boyer-Moore algorithm
MySQL :: MySQL 8.0 Reference Manual :: 8.3.9 Comparison of B-Tree and Hash Indexes https://dev.mysql ...
- :setting:`task_soft_time_limit` celery 异步任务 执行时间限制 内存限制
https://docs.celeryproject.org/en/stable/userguide/configuration.html?highlight=control_exchange#new ...
- mdns
mdns mdns_百度百科 https://baike.baidu.com/item/mdns 在计算机网络中 , 多播DNS ( mDNS )协议将主机名解析为不包含本地名称服务器的小型网络中的I ...
- postgresql 知识的整理
.example { background-color: rgba(229, 236, 243, 1); color: rgba(0, 0, 0, 1); padding: 0.5em; margin ...
- mysql中int型的数字怎么转换成字符串
字段:number 是integer类型 在表test中 select cast(number as char) as number from test; 或者convert()方法.因为转换 ...
- poj 2752Seek the Name, Seek the Fame
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %I64d &am ...
- XCTF-easyjni
前期工作 查壳无壳 逆向分析 文件结构 MainActivity代码 public class MainActivity extends c { static { System.loadLibrary ...
- Flutter环境搭建遇坑小结(一)
对flutter的了解与开发也有一段时间了,总的来说,搭建开发环境遇到的各种坑也是很多,尤其对于初次接触Android开发的人员来说 一.flutter运行提示Running Gradle task ...
- 开发基础 (变量、数据类型、格式化输出、运算符、流程控制、while循环)
一.变量 name = "SmallNine" 等号前面是变量名(标识符),等号后面是变量值 变量的主要作用:就是把程序运算的中间结果临时存到内存里,已备后面的代码继续调用. 变量 ...
- 18.RAID介绍和部署磁盘阵列
1.RAID RAID(Redundant Array of Independent Disks,独立冗余磁盘阵列)技术具备的冗余备份机制以及提升了的硬盘吞吐量. 1)RAID 0:把多块物理硬盘设备 ...