[PR #632] [MERGED] Fix issue #617 by using mark_safe in combination with format_html #1254

Closed
opened 2026-03-01 14:49:03 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/632
Author: @aspensmonster
Created: 1/24/2021
Status: Merged
Merged: 1/28/2021
Merged by: @pirate

Base: devHead: bugfix/issue-617


📝 Commits (3)

  • 1989275 Fix issue #617 by using mark_safe in combination with format_html
  • b647581 Update archivebox/index/html.py
  • 1810426 Remove now-unused mark_safe import

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 archivebox/index/html.py (+1 -1)

📄 Description

I have no experience with Django, so all I'm really going off of is this
stackoverflow

https://stackoverflow.com/a/64498319

which cited this bit of Django documentation:

https://docs.djangoproject.com/en/3.1/ref/utils/#django.utils.html.format_html

After using this method, I no longer get the 500 error or KeyError
exception, and can browse the local server and interact with the single
entry in it (the problematic URL in ArchiveBox#617 with curly braces).

Whether this is the "right" method or not, I have no idea. But it is at
least a start.

Summary

Fixes 500 errors on /public/ URL, experienced in issue #617. May not completely resolve all issues in #617.

Related issues

None.

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Snapshot data layout on disk

🔄 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/ArchiveBox/ArchiveBox/pull/632 **Author:** [@aspensmonster](https://github.com/aspensmonster) **Created:** 1/24/2021 **Status:** ✅ Merged **Merged:** 1/28/2021 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `bugfix/issue-617` --- ### 📝 Commits (3) - [`1989275`](https://github.com/ArchiveBox/ArchiveBox/commit/1989275944ae5d4194270f842c7ebddd44c79291) Fix issue #617 by using mark_safe in combination with format_html - [`b647581`](https://github.com/ArchiveBox/ArchiveBox/commit/b647581115b601459962ae66a6898a9b6c483c9b) Update archivebox/index/html.py - [`1810426`](https://github.com/ArchiveBox/ArchiveBox/commit/1810426774ebea0d350fe3926278da60680b8d08) Remove now-unused mark_safe import ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `archivebox/index/html.py` (+1 -1) </details> ### 📄 Description I have no experience with Django, so all I'm really going off of is this stackoverflow https://stackoverflow.com/a/64498319 which cited this bit of Django documentation: https://docs.djangoproject.com/en/3.1/ref/utils/#django.utils.html.format_html After using this method, I no longer get the 500 error or KeyError exception, and can browse the local server and interact with the single entry in it (the problematic URL in ArchiveBox#617 with curly braces). Whether this is the "right" method or not, I have no idea. But it is at least a start. # Summary Fixes 500 errors on /public/ URL, experienced in issue #617. May not completely resolve all issues in #617. # Related issues None. # Changes these areas - [x] Bugfixes - [ ] Feature behavior - [ ] Command line interface - [ ] Configuration options - [ ] Internal architecture - [ ] Snapshot data layout on disk --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 14:49:03 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#1254
No description provided.