Project

General

Profile

Actions

Bug #10945

closed

Alias popup not displaying contents

Added by Jim Pingle over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Aliases / Tables
Target version:
Start date:
10/01/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.5.0
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

2020-10-01_11-30.png (19.8 KB) 2020-10-01_11-30.png Jim Pingle, 10/01/2020 10:32 AM
Screenshot 2020-10-02 at 16.02.22.png (249 KB) Screenshot 2020-10-02 at 16.02.22.png Danilo Zrenjanin, 10/02/2020 09:03 AM
Screenshot 2020-10-02 at 16.04.25.png (241 KB) Screenshot 2020-10-02 at 16.04.25.png Danilo Zrenjanin, 10/02/2020 09:04 AM
Actions #1

Updated by Viktor Gurov over 3 years ago

same issue with gateway_info_popup()
and on Firewall NAT pages too

Actions #2

Updated by Anonymous over 3 years ago

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.

Actions #3

Updated by Anonymous over 3 years ago

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"]

Actions #4

Updated by Anonymous over 3 years ago

  • Status changed from New to Feedback
Actions #5

Updated by Anonymous over 3 years ago

  • % Done changed from 0 to 100
Actions #6

Updated by Danilo Zrenjanin over 3 years ago

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.

Actions #7

Updated by Jim Pingle over 3 years ago

  • Status changed from Resolved to In Progress

Aliases are working OK for me but Gateway popovers are empty still.

Actions #8

Updated by Anonymous over 3 years ago

The gateway popup issue is not related to this one. See https://redmine.pfsense.org/issues/10948

Actions #9

Updated by Anonymous over 3 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF