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.
This commit is contained in:
Ingo Schommer 2013-03-20 17:58:17 +01:00
parent 74014650ed
commit 2787d360c1

View File

@ -33,7 +33,7 @@ class HtmlEditorField extends TextareaField {
'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');