summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-23 12:46:23 +0545
committerRenato Botelho <renato@netgate.com>2017-03-07 15:02:00 -0300
commitb77ddf68862ad6fe0752e55a2042e323ae485beb (patch)
tree90612d3ecfa431b02e080ef02ba970a681d11d36
parent2ff475b7da4095a39120f9f754706918ab90dcc6 (diff)
downloadpfsense-b77ddf68862ad6fe0752e55a2042e323ae485beb.zip
pfsense-b77ddf68862ad6fe0752e55a2042e323ae485beb.tar.gz
Redmine #7301 Provide word-break opportunity for dynamic DNS host names
Signed-off-by: Phil Davis <phil.davis@inf.org> (cherry picked from commit 138e79d42cb1771e3b8fcc727270187f5c7ee7db)
-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 abcf0ad..d03163c 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -430,6 +430,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 0224177..ecdb3cf 100644
--- a/src/usr/local/www/services_dyndns.php
+++ b/src/usr/local/www/services_dyndns.php
@@ -173,7 +173,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 27ee09d..d932a63 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
@@ -229,7 +229,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