Skip to content

Commit

Permalink
FIX "Insert Link" and other TinyMCE loading bugs (fixes #8327)
Browse files Browse the repository at this point in the history
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
chillu committed Mar 20, 2013
1 parent 7401465 commit 2787d36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion forms/HtmlEditorField.php
Expand Up @@ -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');
Expand Down

0 comments on commit 2787d36

Please sign in to comment.