summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-02-10 16:22:05 -0500
committerSteve Beaver <sbeaver@netgate.com>2017-02-10 16:22:05 -0500
commit4b72f68fd9fa2c33d34efafc23f31a374f1a6a5a (patch)
treeb9577b5ba78c1667fdd52c3ee86805a016fe6fa4 /src
parent8b2cb5a45c9a815382acd634189a5c8090c4c0ff (diff)
downloadpfsense-4b72f68fd9fa2c33d34efafc23f31a374f1a6a5a.zip
pfsense-4b72f68fd9fa2c33d34efafc23f31a374f1a6a5a.tar.gz
Replace '_' with '_<wbr> when displaying alias names. Allows long alias names with underscores to word-break better.
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/firewall_nat.php12
-rw-r--r--src/usr/local/www/firewall_rules.php16
2 files changed, 14 insertions, 14 deletions
diff --git a/src/usr/local/www/firewall_nat.php b/src/usr/local/www/firewall_nat.php
index 860f90f..4bf2316 100644
--- a/src/usr/local/www/firewall_nat.php
+++ b/src/usr/local/www/firewall_nat.php
@@ -335,7 +335,7 @@ foreach ($a_nat as $natent):
<?php
endif;
?>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_address($natent['source'])))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_address($natent['source'])))?>
<?php
if (isset($alias['src'])):
?>
@@ -352,7 +352,7 @@ foreach ($a_nat as $natent):
<?php
endif;
?>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_port($natent['source']['port'])))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_port($natent['source']['port'])))?>
<?php
if (isset($alias['srcport'])):
?>
@@ -370,7 +370,7 @@ foreach ($a_nat as $natent):
<?php
endif;
?>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_address($natent['destination'])))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_address($natent['destination'])))?>
<?php
if (isset($alias['dst'])):
?>
@@ -387,7 +387,7 @@ foreach ($a_nat as $natent):
<?php
endif;
?>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_port($natent['destination']['port'])))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_port($natent['destination']['port'])))?>
<?php
if (isset($alias['dstport'])):
?>
@@ -405,7 +405,7 @@ foreach ($a_nat as $natent):
endif;
?>
- <?=str_replace('_', ' ', htmlspecialchars($natent['target']))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars($natent['target']))?>
<?php
if (isset($alias['target'])):
?>
@@ -422,7 +422,7 @@ foreach ($a_nat as $natent):
<?php
endif;
?>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_port($localport)))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_port($localport)))?>
<?php
if (isset($alias['targetport'])):
?>
diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php
index 747ea50..cf5efc9 100644
--- a/src/usr/local/www/firewall_rules.php
+++ b/src/usr/local/www/firewall_rules.php
@@ -706,7 +706,7 @@ foreach ($a_filter as $filteri => $filterent):
<td>
<?php if (isset($alias['src'])): ?>
<a href="/firewall_aliases_edit.php?id=<?=$alias['src']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['src'])?>" data-html="true" usepost>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_address($filterent['source'])))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_address($filterent['source'])))?>
</a>
<?php else: ?>
<?=htmlspecialchars(pprint_address($filterent['source']))?>
@@ -715,7 +715,7 @@ foreach ($a_filter as $filteri => $filterent):
<td>
<?php if (isset($alias['srcport'])): ?>
<a href="/firewall_aliases_edit.php?id=<?=$alias['srcport']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['srcport'])?>" data-html="true" usepost>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_port($filterent['source']['port'])))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_port($filterent['source']['port'])))?>
</a>
<?php else: ?>
<?=htmlspecialchars(pprint_port($filterent['source']['port']))?>
@@ -724,7 +724,7 @@ foreach ($a_filter as $filteri => $filterent):
<td>
<?php if (isset($alias['dst'])): ?>
<a href="/firewall_aliases_edit.php?id=<?=$alias['dst']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['dst'])?>" data-html="true" usepost>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_address($filterent['destination'])))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_address($filterent['destination'])))?>
</a>
<?php else: ?>
<?=htmlspecialchars(pprint_address($filterent['destination']))?>
@@ -733,7 +733,7 @@ foreach ($a_filter as $filteri => $filterent):
<td>
<?php if (isset($alias['dstport'])): ?>
<a href="/firewall_aliases_edit.php?id=<?=$alias['dstport']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['dstport'])?>" data-html="true" usepost>
- <?=str_replace('_', ' ', htmlspecialchars(pprint_port($filterent['destination']['port'])))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_port($filterent['destination']['port'])))?>
</a>
<?php else: ?>
<?=htmlspecialchars(pprint_port($filterent['destination']['port']))?>
@@ -741,7 +741,7 @@ foreach ($a_filter as $filteri => $filterent):
</td>
<td>
<?php if (isset($config['interfaces'][$filterent['gateway']]['descr'])):?>
- <?=str_replace('_', ' ', htmlspecialchars($config['interfaces'][$filterent['gateway']]['descr']))?>
+ <?=str_replace('_', '_<wbr>', htmlspecialchars($config['interfaces'][$filterent['gateway']]['descr']))?>
<?php else: ?>
<?=htmlspecialchars(pprint_port($filterent['gateway']))?>
<?php endif; ?>
@@ -751,10 +751,10 @@ foreach ($a_filter as $filteri => $filterent):
if (isset($filterent['ackqueue']) && isset($filterent['defaultqueue'])) {
$desc = str_replace('_', ' ', $filterent['ackqueue']);
echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['ackqueue']}&amp;action=show\" usepost>{$desc}</a>";
- $desc = str_replace('_', ' ', $filterent['defaultqueue']);
+ $desc = str_replace('_', '_<wbr>', $filterent['defaultqueue']);
echo "/<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&amp;action=show\" usepost>{$desc}</a>";
} else if (isset($filterent['defaultqueue'])) {
- $desc = str_replace('_', ' ', $filterent['defaultqueue']);
+ $desc = str_replace('_', '_<wbr>', $filterent['defaultqueue']);
echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&amp;action=show\" usepost>{$desc}</a>";
} else {
echo gettext("none");
@@ -765,7 +765,7 @@ foreach ($a_filter as $filteri => $filterent):
<?php if ($printicon) { ?>
<i class="fa fa-<?=$image?> <?=$dispcolor?>" title="<?=$alttext;?>"></i>
<?php } ?>
- <?=$schedule_span_begin;?><?=str_replace('_', ' ', htmlspecialchars($filterent['sched']));?>&nbsp;<?=$schedule_span_end;?>
+ <?=$schedule_span_begin;?><?=str_replace('_', '_<wbr>', htmlspecialchars($filterent['sched']));?>&nbsp;<?=$schedule_span_end;?>
</td>
<td>
<?=htmlspecialchars($filterent['descr']);?>
OpenPOWER on IntegriCloud