[PR #45] [MERGED] Fix double html-character encoding by removing htmlentities() in DnsLookup #49

Closed
opened 2026-02-27 23:20:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spatie/dnsrecords.io/pull/45
Author: @bartvanraaij
Created: 9/28/2018
Status: Merged
Merged: 9/28/2018
Merged by: @freekmurze

Base: masterHead: fix-double-html-encoding


📝 Commits (1)

  • fd1366d Fix double html-character encoding by removing htmlentities() in DnsLookup

📊 Changes

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

View changed files

📝 app/Services/Commands/Commands/DnsLookup.php (+1 -1)

📄 Description

This fixes https://github.com/spatie/dnsrecords.io/issues/44

The displayed data is already being character-encoded by Blade:

By default, Blade {{ }} statements are automatically sent through PHP's htmlspecialchars function to prevent XSS attacks.
https://laravel.com/docs/5.7/blade#displaying-data

So if I'm not mistaken, htmlentities() can safely be removed.


🔄 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/spatie/dnsrecords.io/pull/45 **Author:** [@bartvanraaij](https://github.com/bartvanraaij) **Created:** 9/28/2018 **Status:** ✅ Merged **Merged:** 9/28/2018 **Merged by:** [@freekmurze](https://github.com/freekmurze) **Base:** `master` ← **Head:** `fix-double-html-encoding` --- ### 📝 Commits (1) - [`fd1366d`](https://github.com/spatie/dnsrecords.io/commit/fd1366d1733702ac521fe001f55cbbd9240959a8) Fix double html-character encoding by removing htmlentities() in DnsLookup ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `app/Services/Commands/Commands/DnsLookup.php` (+1 -1) </details> ### 📄 Description This fixes https://github.com/spatie/dnsrecords.io/issues/44 The displayed data is already being character-encoded by Blade: > By default, Blade {{ }} statements are automatically sent through PHP's htmlspecialchars function to prevent XSS attacks. https://laravel.com/docs/5.7/blade#displaying-data So if I'm not mistaken, `htmlentities()` can safely be removed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 23:20:13 +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/dnsrecords.io#49
No description provided.