mirror of
https://github.com/PowerDNS-Admin/PowerDNS-Admin.git
synced 2026-04-25 08:45:55 +03:00
[GH-ISSUE #28] Break lines when displaying records, which are very long #23
Labels
No labels
bug / broken-feature
bug / broken-feature
docs / request
feature / request
help / other
mod / help-wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PowerDNS-Admin-PowerDNS-Admin#23
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 @piwats on GitHub (Apr 19, 2016).
Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/28
When you have a long record, f.e. a dkim key which can go up to 254 chars, PowerDNS-Admin does not break the lines in order to be more compact.
This affects how all the records are displayed, that is that the 'Data' field becomes unnecessary long.
@ivanfilippov commented on GitHub (Apr 20, 2016):
This is a good idea. I have a sample implementation here https://github.com/ivanfilippov/PowerDNS-Admin/tree/long_records_fix
The end result looks like this:

@ngoduykhanh Please review to let me know if my implementation works for you and I'll submit a PR.
@ngoduykhanh commented on GitHub (Apr 21, 2016):
@ivanfilippov : for long line data, after pressing
editbutton i got no data. I think it is because the data field is currently a input text filed, not a text area.I tried with:
Chrome: 49.0.2623.112
Safari: 9.1
@ivanfilippov commented on GitHub (Apr 21, 2016):
Weird, I'm not seeing that, I'm testing on:
Chrome: 50.0.2661.75
Firefox: 32.0.1
EDGE: 25.10586.0.0
I think it shouldn't affect the input field because they have static widths but I'm going to look into it.
@ngoduykhanh commented on GitHub (Apr 21, 2016):
Yes, it's weird, it tried on Firefox 45.0.2 too. All my test is on MacOS. I will try on a windows machine also.
Sample data:
@ivanfilippov commented on GitHub (Apr 21, 2016):
I've replicated it, has something to do with the doublequotes around that data (I was testing with long string without quotes).
@ivanfilippov commented on GitHub (Apr 21, 2016):
It happens in master as well, not sure when that broke, because I've created and modified TXT and SPF records in my environment before and all mine still have the double-quotes.
So the issue is that the double quotes get parsed as part of the HTML because the first double-quote closes the
value="tag like so:<input type="text" class="form-control input-small advance-data" value="" v="DKIM1;" ="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfl0chtL4siFYCrSPxw43fqc4zOo3N+Il220oK2Cp+NZw9Kuvg8iu2Ua3zfbUnZWvWK4aEeooliRd7SXIhKpXkgkwnAB3DGAQ6+/7UVXf9xOeupr1DqtNwKt/NngC7ZIZyNRPx1HWKleP13UXCD8macUEbbcBhthrnETKoCg8wOwIDAQAB""">Going to look for a way to escape the string before passing it to the template.
@ivanfilippov commented on GitHub (Apr 21, 2016):
Oops, sorry about that didn't realize I'd spam this issue with my cleanup commits. Made a mess of a rebase and had to fix a whole bunch of stuff.
I've also submitted PR #33 to fix the blank input data field for review.
@ngoduykhanh commented on GitHub (Apr 21, 2016):
@ivanfilippov : it's ok. Your changes from branch
long_records_fixandstring_escape_fixwork fine for me. I think you can merge them. I also put a comment in your PR #33. Thank you.@ivanfilippov commented on GitHub (Apr 21, 2016):
@ngoduykhanh Your comment on #33 is a good idea, do you want me to append it to that PR or make a new one? Once you merge #33, I'll rebase
long_records_fixto make a clean merge and submit the PR.@ngoduykhanh commented on GitHub (Apr 21, 2016):
@ivanfilippov : You can append directly. Thanks!
@ivanfilippov commented on GitHub (Apr 21, 2016):
PR to fix this submitted.