mirror of
https://github.com/spatie/dnsrecords.io.git
synced 2026-04-29 09:25:52 +03:00
[GH-ISSUE #44] Double encoding render error #20
Labels
No labels
bug
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/dnsrecords.io#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @freekmurze on GitHub (Sep 28, 2018).
Original GitHub issue: https://github.com/spatie/dnsrecords.io/issues/44
See: https://twitter.com/bartvanraaij/status/1045607240248565761
This should be fixed.
@jryd commented on GitHub (Sep 28, 2018):
I'll take a look at this now.
@bartvanraaij commented on GitHub (Sep 28, 2018):
@jryd you beat me to it by 16 seconds, lol!
Slight difference in implementation though.
My PR just removes the
htmlentities()altogether because I assumed the htmlspecialchars-encoding of Blade would be sufficient. Is there any reason to to think otherwise?@jryd commented on GitHub (Sep 28, 2018):
@bartvanraaij unless I am mistaken, this won't fix the issue? htmlspecialchars still performs translation on quotes?
I gave this a whirl in tinker to verify:

@bartvanraaij commented on GitHub (Sep 28, 2018):
@jryd
A single round of encoding is completely fine, because the browser will display
"as".The problem was that
htmlentities()transformed a"into"and after thathtmlspecialchars()(inside Blade) transformed that into"(see screenshot in my tweet).See screenshot with my patch applied:

@jryd commented on GitHub (Sep 28, 2018):
Ahh yes, I stand corrected. Unless there’s a need to remove any html entities, then I am inclined to agree that your implementation is better.