luci-app-ddns: Fix multiple IP display bug
authorPaul Donald <[email protected]>
Wed, 23 Apr 2025 12:03:50 +0000 (14:03 +0200)
committerPaul Donald <[email protected]>
Wed, 23 Apr 2025 12:03:50 +0000 (14:03 +0200)
Occasionally, a DNS lookup returns multiple IPs, so the best thing to
do isn't to join them together as a unified string, but to separate
them with an HTML <br/>.

Signed-off-by: Paul Donald <[email protected]>
applications/luci-app-ddns/root/usr/share/rpcd/ucode/ddns.uc

index b3395280010ec9d801f092f5583e5d9de111aade..ad959a447ba330b5032585bfad0e0b2fc915fe16 100644 (file)
@@ -178,7 +178,7 @@ const methods = {
                                }
 
                                res[section] = {
-                                       ip: ip ? replace(ip, '\n', '') : null,
+                                       ip: ip ? replace(trim(ip), '\n', '<br/>') : null,
                                        last_update: lastUpdate !== 0 ? convertedLastUpdate : null,
                                        next_update: nextUpdate || null,
                                        pid: pid || null,