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

Commit

Permalink
fix(ux): add check to iframe link handler if link has "javascript:" i…
Browse files Browse the repository at this point in the history
…n href attr or onclick attr will skip (#7167)

Resolve MON-3148
  • Loading branch information
vhr authored Feb 5, 2019
1 parent 6202108 commit 75d3aae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions www/include/core/footer/footerPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,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

0 comments on commit 75d3aae

Please sign in to comment.