Bug #10945
closed
Alias popup not displaying contents
Added by Jim Pingle almost 4 years ago.
Updated almost 4 years ago.
Category:
Aliases / Tables
Affected Architecture:
All
Description
On firewall rules when hovering over an alias, the info popup only displays the header "Alias details" and no contents. Inspecting the element in the browser shows the contents are in the HTML, but are not being rendered.
This is on a current snapshot. I have another VM on a snapshot from the 17th and it is OK, so something in the last two weeks (Bootstrap changes?)
Files
same issue with gateway_info_popup()
and on Firewall NAT pages too
The issue is caused by changes in Bootstrap 3.4.1 which disable HTML in popovers. In theory, this should turn off the sanitizer:
$('[data-toggle="popover"]').popover({
sanitize: false,
});
but it does not work as expected. Researching other options.
Specifically adding table elements to the sanitizer's list of allowed content is effective:
// Bootstrap 3.4.1+ sanitizes the contents of popovers even when data-html is specified
// Add table tags to the list of elements permitted by the sanitizer
var defaultWhiteList = $.fn.tooltip.Constructor.DEFAULTS.whiteList
defaultWhiteList.table = []
defaultWhiteList.thead = []
defaultWhiteList.tr = []
defaultWhiteList.th = ["style"]
defaultWhiteList.tbody = []
defaultWhiteList.td = ["style"]
- Status changed from New to Feedback
- % Done changed from 0 to 100
Tested the patch on the:
2.5.0-DEVELOPMENT (amd64)
built on Fri Oct 02 06:54:02 EDT 2020
FreeBSD 12.2-STABLE
It looks fine now. Ticket resloved.
- Status changed from Resolved to In Progress
Aliases are working OK for me but Gateway popovers are empty still.
- Status changed from In Progress to Resolved
Also available in: Atom
PDF