Bug #7249
closedfirewall_rules.php & firewall_nat.php: Replaces underscores with spaces in aliase names
0%
Description
I have a number of firewall aliases that contain underscores. The underscore is replaced with a space when viewing a firewall rule that uses the alias.
Steps to reproduce- Create firewall alias that contains an underscore (e.g. "Web_TCP" or "Amazon_Servers")
- Create firewall rule that uses the alias as a source, source port, destination or destination port.
- The resulting firewall rules view will display the alias with a space instead of an underscore (e.g. "Web TCP" or "Amazon Servers")
This occurs with both IP and Port aliases. Using Firefox/Chrome inspector shows that the underscore has been replaced with a space. Editing the firewall rule lists the correct alias with the underscore.
Thank you to the pfSense/Netgate team for all of your handwork!
Updated by Anonymous almost 8 years ago
That is not exactly a bug, the underscore is deliberately replaced with a space for display. It seems to have been a PR to allow the alias name to line-wrap if very long. There may be a better way.
Updated by Anonymous almost 8 years ago
- Subject changed from Web Interface replaces firewall aliases that contain underscores with spaces to firewall_rules.php & firewall_nat.php: Replaces underscores with spaces in aliase names
- Status changed from New to Feedback
- Assignee set to Zetto Null
Changed the code to replace '_' with '_<wbr>' (word break opportunity). Allows a long alias name to word-wrap, but retains the '_'.
Updated by Zetto Null almost 8 years ago
Steve Beaver wrote:
Changed the code to replace '_' with '_<wbr>' (word break opportunity). Allows a long alias name to word-wrap, but retains the '_'.
Thank you Steve! I'm guessing this will miss the window for 2.3.3?
Updated by BBcan177 . almost 8 years ago
Cool... This will help pfBlockerNG as all the Auto rules are pfB_<aliasname>_v4... Thanks Steve!
Updated by NOYB NOYB almost 8 years ago
So what is the actual issue that replacing the underscore with space in the displaying of the rules creates? Is there some functionality lost? It is only visual. And since the names cannot actually contain spaces, any where a space is displayed it is known to be an underscore.
Really don't see this as an issue. The <wbr> approach was intentionally avoided because hanging underscores are unappealing.
Why should pfBlockerNB be impacted by the display. The names/values are not actually changed.
I would like to request that this be reverted back to a plain space.
Thanks
P.S. So thankful this missed 2.3.3
Updated by Zetto Null over 7 years ago
NOYB NOYB wrote:
So what is the actual issue that replacing the underscore with space in the displaying of the rules creates? Is there some functionality lost? It is only visual. And since the names cannot actually contain spaces, any where a space is displayed it is known to be an underscore.
Really don't see this as an issue. The <wbr> approach was intentionally avoided because hanging underscores are unappealing.
Why should pfBlockerNB be impacted by the display. The names/values are not actually changed.
I would like to request that this be reverted back to a plain space.
Thanks
P.S. So thankful this missed 2.3.3
If a user uses an underscore in an alias name then they expect that to be reflected when the alias is used. I'm failing to see how this impacts you. If you don't like it, don't use an underscore in any of your aliases.
It looks like this wasn't pushed to 2.3.3-p1. What's needed to get this in the next release?
Updated by Jim Pingle about 7 years ago
- Status changed from Feedback to Resolved