Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(ux): add check to iframe link handler if link has "javascript:" i… #6897

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions www/include/core/footer/footerPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,13 @@ function parentHrefUpdate(href) {
'click',
function(e) {
var href = jQuery(this).attr('href');
var isOnLoad = jQuery(this).is('[onload]');
var isHandled = jQuery(this).is('[onload]') ||
jQuery(this).is('[onclick]') ||
(href.match(/^javascript:/) !== null)
;

// if it's a relative path, we can use the default redirection
if (!href.match(/^\.\/(?!main(?:\.get)?\.php)/) && isOnLoad === false) {
if (!href.match(/^\.\/(?!main(?:\.get)?\.php)/) && isHandled === false) {
e.preventDefault();

// Manage centreon links
Expand Down