Allow breaking words in DNS record content if needed to avoid overflowing table
Hanno Böck

Hanno Böck commited on 2025-08-28 14:45:21
Zeige 2 geänderte Dateien mit 6 Einfügungen und 2 Löschungen.

... ...
@@ -98,7 +98,7 @@ foreach ($records as $rec) {
98 98
     if ($editable) {
99 99
         $link = internal_link('dns_record_edit', $rec['fqdn'], "id={$rec['id']}");
100 100
     }
101
-    output("<tr><td>{$link}</td><td>" . strtoupper($rec['type']) . "</td><td>" . $data . "</td>" . $ttl . "<td>" . $delete . "</td></tr>\n");
101
+    output("<tr><td>{$link}</td><td>" . strtoupper($rec['type']) . "</td><td class='wrapany'>" . $data . "</td>" . $ttl . "<td>" . $delete . "</td></tr>\n");
102 102
 }
103 103
 foreach ($auto_records as $rec) {
104 104
     $data = filter_output_html($rec['ip'] ? $rec['ip'] : $rec['data']);
... ...
@@ -113,7 +113,7 @@ foreach ($auto_records as $rec) {
113 113
     } else {
114 114
         $ttl = "<td class='gray'>$domainttl Sek.</td>";
115 115
     }
116
-    output("<tr><td><em>{$rec['fqdn']}</em></td><td>" . strtoupper($rec['type']) . "</td><td>$data</td>" . $ttl . "<td>&#160;</td></tr>\n");
116
+    output("<tr><td><em>{$rec['fqdn']}</em></td><td>" . strtoupper($rec['type']) . "</td><td class='wrapany'>$data</td>" . $ttl . "<td>&#160;</td></tr>\n");
117 117
 }
118 118
 
119 119
 
... ...
@@ -528,3 +528,7 @@ p.login_option.active {
528 528
 .gray {
529 529
     color: #777;
530 530
 }
531
+
532
+.wrapany {
533
+    overflow-wrap: anywhere;
534
+}
531 535