[GH-ISSUE #28] Break lines when displaying records, which are very long #23

Closed
opened 2026-02-26 10:35:36 +03:00 by kerem · 11 comments
Owner

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.

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.
kerem closed this issue 2026-02-26 10:35:37 +03:00
Author
Owner

@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:
wrapping

@ngoduykhanh Please review to let me know if my implementation works for you and I'll submit a PR.

<!-- gh-comment-id:212643356 --> @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: ![wrapping](http://i.imgur.com/e3kAcxD.jpg) @ngoduykhanh Please review to let me know if my implementation works for you and I'll submit a PR.
Author
Owner

@ngoduykhanh commented on GitHub (Apr 21, 2016):

@ivanfilippov : for long line data, after pressing edit button 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

<!-- gh-comment-id:212681442 --> @ngoduykhanh commented on GitHub (Apr 21, 2016): @ivanfilippov : for long line data, after pressing `edit` button 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
Author
Owner

@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.

<!-- gh-comment-id:212683093 --> @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.
Author
Owner

@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:

v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfl0chtL4siFYCrSPxw43fqc4zOo3N+Il220oK2Cp+NZw9Kuvg8iu2Ua3zfbUnZWvWK4aEeooliRd7SXIhKpXkgkwnAB3DGAQ6+/7UVXf9xOeupr1DqtNwKt/NngC7ZIZyNRPx1HWKleP13UXCD8macUEbbcBhthrnETKoCg8wOwIDAQAB
<!-- gh-comment-id:212697482 --> @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: ``` v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfl0chtL4siFYCrSPxw43fqc4zOo3N+Il220oK2Cp+NZw9Kuvg8iu2Ua3zfbUnZWvWK4aEeooliRd7SXIhKpXkgkwnAB3DGAQ6+/7UVXf9xOeupr1DqtNwKt/NngC7ZIZyNRPx1HWKleP13UXCD8macUEbbcBhthrnETKoCg8wOwIDAQAB ```
Author
Owner

@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).

<!-- gh-comment-id:212749228 --> @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).
Author
Owner

@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&quot;&quot;">

Going to look for a way to escape the string before passing it to the template.

<!-- gh-comment-id:212749998 --> @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&quot;&quot;">` Going to look for a way to escape the string before passing it to the template.
Author
Owner

@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.

<!-- gh-comment-id:212766546 --> @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.
Author
Owner

@ngoduykhanh commented on GitHub (Apr 21, 2016):

@ivanfilippov : it's ok. Your changes from branch long_records_fix and string_escape_fix work fine for me. I think you can merge them. I also put a comment in your PR #33. Thank you.

<!-- gh-comment-id:212769801 --> @ngoduykhanh commented on GitHub (Apr 21, 2016): @ivanfilippov : it's ok. Your changes from branch `long_records_fix` and `string_escape_fix` work fine for me. I think you can merge them. I also put a comment in your PR #33. Thank you.
Author
Owner

@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_fix to make a clean merge and submit the PR.

<!-- gh-comment-id:212771952 --> @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_fix` to make a clean merge and submit the PR.
Author
Owner

@ngoduykhanh commented on GitHub (Apr 21, 2016):

@ivanfilippov : You can append directly. Thanks!

<!-- gh-comment-id:212772379 --> @ngoduykhanh commented on GitHub (Apr 21, 2016): @ivanfilippov : You can append directly. Thanks!
Author
Owner

@ivanfilippov commented on GitHub (Apr 21, 2016):

PR to fix this submitted.

<!-- gh-comment-id:212790820 --> @ivanfilippov commented on GitHub (Apr 21, 2016): PR to fix this submitted.
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/PowerDNS-Admin-PowerDNS-Admin#23
No description provided.