Browse files

FIX "Insert Link" and other TinyMCE loading bugs (fixes #8327)

Caused by SS loading a URL with html entities (&)
through the Requirements API, which only works when directly
inserted into the HTML template (standard behaviour),
but garbles the URL GET parameters when loaded via the jQuery.ondemand
JavaScript/XHR logic.

It didn't fail the request, just meant that tiny_mce_gzip.php wasn't
getting all the required options from the GET parameters.
And since this newly loaded file contains the same JS globals,
it would override previously loaded (correct) state.
  • Loading branch information...
1 parent 7401465 commit 2787d360c18e1d6c64c89ba1c237b0fd9ed06774 @chillu chillu committed Mar 20, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/HtmlEditorField.php
@@ -33,7 +33,7 @@ public static function include_js() {
'languages' => $configObj->getOption('language')
), true);
preg_match('/src="([^"]*)"/', $tag, $matches);
- Requirements::javascript($matches[1]);
+ Requirements::javascript(html_entity_decode($matches[1]));
} else {
Requirements::javascript(MCE_ROOT . 'tiny_mce_src.js');

0 comments on commit 2787d36

Please sign in to comment.