Commit 31f050bc authored by Stanislas Rolland's avatar Stanislas Rolland
Browse files

[BUGFIX] RTE: Quick Tag plugin may raise JS exception in Google Chrome

A JavaScript exception may be raised in Google Chrome on attempt to
access a style sheet on a different domain.

Releases: master
Resolves: #63716
Change-Id: I16b5eb5630e0d4855023bb3ec7e5344574460cad
Reviewed-on: http://review.typo3.org/35204


Reviewed-by: default avatarStanislas Rolland <typo3@sjbr.ca>
Tested-by: default avatarStanislas Rolland <typo3@sjbr.ca>
parent 73996f22
......@@ -227,7 +227,7 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/CSS/Parser',
// Import rule
try {
if (cssRules[rule].styleSheet && cssRules[rule].styleSheet.cssRules) {
this.parseRules(cssRules[rule].styleSheet.cssRules);
this.parseRules(cssRules[rule].styleSheet.cssRules);
}
} catch (e) {
if (/Security/i.test(e)) {
......
......@@ -243,10 +243,12 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/QuickTag',
}));
}
} else {
// ImportRule (Mozilla)
// ImportRule (Mozilla)
if (rule.styleSheet) {
try {
this.parseCssRule(rule.styleSheet.cssRules, valueStore);
if (rule.styleSheet.cssRules) {
this.parseCssRule(rule.styleSheet.cssRules, valueStore);
}
} catch (e) {
if (/Security/i.test(e)) {
this.appendToLog('parseCssRule', 'A security error occurred. Make sure all stylesheets are accessed from the same domain/subdomain and using the same protocol as the current script.', 'error');
......@@ -255,11 +257,11 @@ define('TYPO3/CMS/Rtehtmlarea/Plugins/QuickTag',
}
}
}
// MediaRule (Mozilla)
// MediaRule (Mozilla)
if (rule.cssRules) {
this.parseCssRule(rule.cssRules, valueStore);
}
// IE imports
// IE imports
if (rule.imports) {
this.parseCssRule(rule.imports, valueStore);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment