summaryrefslogtreecommitdiffstats
path: root/src/usr/local
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-23 12:46:23 +0545
committerPhil Davis <phil.davis@inf.org>2017-02-23 12:46:23 +0545
commit138e79d42cb1771e3b8fcc727270187f5c7ee7db (patch)
treefcb198f14aa513722b4e31b5c86d45ad1282ec3e /src/usr/local
parent27d15a216fcc86cbeef4db4ced518438fc07378d (diff)
downloadpfsense-138e79d42cb1771e3b8fcc727270187f5c7ee7db.zip
pfsense-138e79d42cb1771e3b8fcc727270187f5c7ee7db.tar.gz
Redmine #7301 Provide word-break opportunity for dynamic DNS host names
Signed-off-by: Phil Davis <phil.davis@inf.org>
Diffstat (limited to 'src/usr/local')
-rw-r--r--src/usr/local/www/guiconfig.inc4
-rw-r--r--src/usr/local/www/services_dyndns.php2
-rw-r--r--src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
index 2fa69fe..e0d383d 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -439,6 +439,10 @@ function pprint_port($port) {
return $pport;
}
+function insert_word_breaks_in_domain_name($domain_name) {
+ return str_replace('.', '.<wbr>', $domain_name);
+}
+
function firewall_check_for_advanced_options(&$item) {
$item_set = "";
if ($item['os']) {
diff --git a/src/usr/local/www/services_dyndns.php b/src/usr/local/www/services_dyndns.php
index 3c7777a..7b8ad6f 100644
--- a/src/usr/local/www/services_dyndns.php
+++ b/src/usr/local/www/services_dyndns.php
@@ -142,7 +142,7 @@ foreach ($a_dyndns as $dyndns):
</td>
<td>
<?php
- print(htmlspecialchars($hostname));
+ print(insert_word_breaks_in_domain_name(htmlspecialchars($hostname)));
?>
</td>
<td>
diff --git a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
index 841620b..743c62b 100644
--- a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
@@ -197,7 +197,7 @@ function get_dyndns_service_text($dyndns_type) {
<?=htmlspecialchars(get_dyndns_service_text($dyndns['type']));?>
</td>
<td>
- <?=htmlspecialchars(get_dyndns_hostname_text($dyndns));?>
+ <?=insert_word_breaks_in_domain_name(htmlspecialchars(get_dyndns_hostname_text($dyndns)));?>
</td>
<td>
<div id="dyndnsstatus<?= $rowid;?>"><?= gettext("Checking ...");?></div>
OpenPOWER on IntegriCloud