Bug #1060

Firewall Aliases, no tooltip in Rules if apostrophe in detail description

Added by David Szpunar over 9 years ago. Updated over 9 years ago.

Web Interface
Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
Affected Architecture:


When editing aliases under Firewall->Aliases, if I have an alias of type Host(s) and in the Description field to the right of each host IP entry (not the overall Alias description field) I have an apostrophe (') anywhere in any of the hosts' descriptions, then once I save and apply the alias and use it in a rule, when I hover over the alias when viewing the rules overview for an interface, the tooltip that normally pops up to display the Alias description and details does not pop up.

It shows a small question mark like it is trying to pop the tooltip up, but only when that apostrophe is in one of the detail descriptions it fails to display (on Google Chrome and Firefox, Windows 7 64-bit). I tested this with a couple of Host type aliases but not other types, though I assume it can be generalized to any apostrophe in any alias detail (individual entry not overall alias) description field.

Basically the apostrophe is not being escaped in the JavaScript for the tooltip, for example this would cause the problem with no tooltip popping up (from <a> tag attribute when viewing source of web interface for LAN rules, firewall_rules.php, and maybe elsewhere I don't know):

onmouseover="domTT_activate(this, event, 'content', '<h1>Facilities Laptop (Mike Smith):</h1><p> - Mike Smith's laptop wired<br> - Mike Smith laptop wireless<br></p>'

As you can see the ' in "...Mike Smith's laptop..." is not escaped and thus prematurely ends the JavaScript tooltip argument. This does not happen when apostrophes are in the overall Alias description field, those are escaped properly. I'm guessing this will be easier and faster to fix than it took me to research and report it :-)

Associated revisions

Revision b6ab9bd2 (diff)
Added by Ermal Luçi over 9 years ago

Ticket #1060. Escape even the alias entry descritpions.


#1 Updated by Ermal Luçi over 9 years ago

  • Status changed from New to Feedback


#2 Updated by David Szpunar over 9 years ago

Confirmed fixed on latest snapshot, using same aliases from same config as the bug was submitted, and tooltip now shows up correctly including where there are apostrophes in the detail notes for any of the detail entries for the alias.

#3 Updated by Chris Buechler over 9 years ago

  • Status changed from Feedback to Resolved


Also available in: Atom PDF