feat(stdlib): Mid2 M8 toml, html escape, and base32
Add read-only TOML subset parse, HTML escape/unescape, and RFC 4648 base32 on encoding; gold tests and public demos included. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
08c48f3acb
commit
435f36b6e9
24 files changed
+748
-18
No files matched your search
+13
-1
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: lib/encoding
|
||||
description: Base64 and hex encode/decode (Mid M1). UTF-8 text round-trip.
|
||||
description: Base64, hex, and base32 encode/decode (Mid M1 + Mid2 M8). UTF-8 text round-trip.
|
||||
---
|
||||
|
||||
## base64_encode
|
||||
@@ -22,3 +22,15 @@ description: Base64 and hex encode/decode (Mid M1). UTF-8 text round-trip.
|
||||
+ `text`
|
||||
|
||||
**> host_encoding_hex_decode text=`text`**
|
||||
|
||||
## base32_encode
|
||||
+ `text`
|
||||
|
||||
RFC 4648 alphabet; padding with `=`.
|
||||
|
||||
**> host_encoding_base32_encode text=`text`**
|
||||
|
||||
## base32_decode
|
||||
+ `text`
|
||||
|
||||
**> host_encoding_base32_decode text=`text`**
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: lib/html
|
||||
description: HTML escape / unescape (Mid2 M8). XSS floor for string assembly.
|
||||
---
|
||||
|
||||
## escape
|
||||
+ `text`
|
||||
|
||||
**> host_html_escape text=`text`**
|
||||
|
||||
## unescape
|
||||
+ `text`
|
||||
|
||||
**> host_html_unescape text=`text`**
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: lib/toml
|
||||
description: Read-only TOML subset parse (Mid2 M8). Tables, scalars, arrays; no array-of-tables.
|
||||
---
|
||||
|
||||
## parse
|
||||
+ `text`
|
||||
|
||||
**> host_toml_parse text=`text`**
|
||||
+11
-1
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: lib/编码
|
||||
description: Base64 与十六进制编解码(中层 M1)。UTF-8 文本往返。
|
||||
description: Base64、十六进制与基32编解码(中层 M1 + Mid2 M8)。UTF-8 文本往返。
|
||||
---
|
||||
|
||||
## 基64编码
|
||||
@@ -22,3 +22,13 @@ description: Base64 与十六进制编解码(中层 M1)。UTF-8 文本往返
|
||||
+ `内容`
|
||||
|
||||
**> host_encoding_hex_decode text=`内容`**
|
||||
|
||||
## 基32编码
|
||||
+ `内容`
|
||||
|
||||
**> host_encoding_base32_encode text=`内容`**
|
||||
|
||||
## 基32解码
|
||||
+ `内容`
|
||||
|
||||
**> host_encoding_base32_decode text=`内容`**
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: lib/超文本
|
||||
description: HTML 转义 / 还原(中层 Mid2 M8)。拼装字符串时的 XSS 底线。
|
||||
---
|
||||
|
||||
## 转义
|
||||
+ `内容`
|
||||
|
||||
**> host_html_escape text=`内容`**
|
||||
|
||||
## 还原
|
||||
+ `内容`
|
||||
|
||||
**> host_html_unescape text=`内容`**
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: lib/配置表
|
||||
description: 只读 TOML 子集解析(中层 Mid2 M8)。表 / 标量 / 数组;无数组表。
|
||||
---
|
||||
|
||||
## 解析
|
||||
+ `内容`
|
||||
|
||||
**> host_toml_parse text=`内容`**
|
||||
Reference in new issue
Block a user