[PR #421] [MERGED] feat: base64 index-data to avoid misencoding #605

Closed
opened 2026-04-08 16:53:38 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigoden/dufs/pull/421
Author: @sigoden
Created: 7/22/2024
Status: Merged
Merged: 7/22/2024
Merged by: @sigoden

Base: mainHead: feat


📝 Commits (1)

  • 928120d feat: base64 index-data to avoid misencoding

📊 Changes

4 files changed (+15 additions, -8 deletions)

View changed files

📝 assets/index.js (+1 -1)
📝 src/auth.rs (+3 -3)
📝 src/server.rs (+6 -2)
📝 tests/utils.rs (+5 -2)

📄 Description

When passing data using html template, its JSON content is automatically escaped for HTML entities. see #419

  <template id="index-data">__INDEX_DATA__</template>

We can use base64 to prevent such issues.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigoden/dufs/pull/421 **Author:** [@sigoden](https://github.com/sigoden) **Created:** 7/22/2024 **Status:** ✅ Merged **Merged:** 7/22/2024 **Merged by:** [@sigoden](https://github.com/sigoden) **Base:** `main` ← **Head:** `feat` --- ### 📝 Commits (1) - [`928120d`](https://github.com/sigoden/dufs/commit/928120d3de86219fcd22c5a08a83ae6d496f4596) feat: base64 index-data to avoid misencoding ### 📊 Changes **4 files changed** (+15 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `assets/index.js` (+1 -1) 📝 `src/auth.rs` (+3 -3) 📝 `src/server.rs` (+6 -2) 📝 `tests/utils.rs` (+5 -2) </details> ### 📄 Description When passing data using html template, its JSON content is automatically escaped for HTML entities. see #419 ``` <template id="index-data">__INDEX_DATA__</template> ``` We can use base64 to prevent such issues. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-04-08 16:53:38 +03:00
zhus closed this issue 2026-04-08 16:53:38 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#605