Do not print JS when there are input errors on diag_dns.php; fix json_encode syntax. Ticket #7999
(cherry picked from commit f32e9531ae21852ef0b21709b8278d1091d55d56)
Do not print JS when there are input errors on diag_dns.php; fix json_encode syntax. Ticket #7999
(cherry picked from commit f32e9531ae21852ef0b21709b8278d1091d55d56)