[PR #4673] [MERGED] HTML: Aligned and standardised DOMDocument usage #6391

Closed
opened 2026-02-05 10:31:04 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4673
Author: @ssddanbrown
Created: 11/14/2023
Status: Merged
Merged: 11/14/2023
Merged by: @ssddanbrown

Base: developmentHead: html_doc_alignment


📝 Commits (1)

  • db7b11f HTML: Aligned and standardised DOMDocument usage

📊 Changes

8 files changed (+214 additions, -163 deletions)

View changed files

📝 app/Entities/Tools/ExportFormatter.php (+13 -25)
📝 app/Entities/Tools/PageContent.php (+17 -57)
📝 app/References/CrossLinkParser.php (+3 -9)
📝 app/References/ReferenceUpdater.php (+8 -23)
📝 app/Search/SearchIndex.php (+3 -9)
📝 app/Util/HtmlContentFilter.php (+10 -22)
app/Util/HtmlDocument.php (+152 -0)
📝 app/Util/HtmlNonceApplicator.php (+8 -18)

📄 Description

Adds a thin wrapper for DOMDocument to simplify and align usage within all areas of BookStack.
Also means we move away from old depreacted mb_convert_encoding usage.

Closes #4638

Todo

  • Manual check over points DOMDocument is used (All points pretty much already covered by tests).

🔄 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/BookStackApp/BookStack/pull/4673 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 11/14/2023 **Status:** ✅ Merged **Merged:** 11/14/2023 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `html_doc_alignment` --- ### 📝 Commits (1) - [`db7b11f`](https://github.com/BookStackApp/BookStack/commit/db7b11fe933b6f9b9962aec18f45a74b56458db5) HTML: Aligned and standardised DOMDocument usage ### 📊 Changes **8 files changed** (+214 additions, -163 deletions) <details> <summary>View changed files</summary> 📝 `app/Entities/Tools/ExportFormatter.php` (+13 -25) 📝 `app/Entities/Tools/PageContent.php` (+17 -57) 📝 `app/References/CrossLinkParser.php` (+3 -9) 📝 `app/References/ReferenceUpdater.php` (+8 -23) 📝 `app/Search/SearchIndex.php` (+3 -9) 📝 `app/Util/HtmlContentFilter.php` (+10 -22) ➕ `app/Util/HtmlDocument.php` (+152 -0) 📝 `app/Util/HtmlNonceApplicator.php` (+8 -18) </details> ### 📄 Description Adds a thin wrapper for DOMDocument to simplify and align usage within all areas of BookStack. Also means we move away from old depreacted mb_convert_encoding usage. Closes #4638 ## Todo - [x] Manual check over points DOMDocument is used (All points pretty much already covered by tests). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:31:04 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6391