Merge branch 'bugfix/html-links-in-plugin-output-don-t-behave-as-expected-11267'
fixes #11267
This commit is contained in:
commit
1de446fa3d
|
@ -174,7 +174,8 @@ class Zend_View_Helper_PluginOutput extends Zend_View_Helper_Abstract
|
|||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$config->set('Core.EscapeNonASCIICharacters', true);
|
||||
$config->set('HTML.Allowed', 'p,br,b,a[href],i,table,tr,td[colspan],div,*[class]');
|
||||
$config->set('HTML.Allowed', 'p,br,b,a[href|target],i,table,tr,td[colspan],div,*[class]');
|
||||
$config->set('Attr.AllowedFrameTargets', array('_blank'));
|
||||
// This avoids permission problems:
|
||||
// $config->set('Core.DefinitionCache', null);
|
||||
$config->set('Cache.DefinitionImpl', null);
|
||||
|
|
|
@ -420,8 +420,8 @@
|
|||
var linkTarget = $a.attr('target');
|
||||
var $target;
|
||||
var formerUrl;
|
||||
var remote = /^(?:[a-z]+:)\/\//;
|
||||
if (href.match(/^(mailto|javascript|data):/)) {
|
||||
if (href.match(/^(?:(?:mailto|javascript|data):|[a-z]+:\/\/)/)) {
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -439,10 +439,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Let remote links pass through
|
||||
if (href.match(remote)) {
|
||||
return true;
|
||||
}
|
||||
// window.open is used as return true; didn't work reliable
|
||||
if (linkTarget === '_blank' || linkTarget === '_self') {
|
||||
window.open(href, linkTarget);
|
||||
|
|
Loading…
Reference in New Issue