From 2787d360c18e1d6c64c89ba1c237b0fd9ed06774 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 20 Mar 2013 17:58:17 +0100 Subject: [PATCH] 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. --- forms/HtmlEditorField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php index b5ffd7844..bda325e5e 100644 --- a/forms/HtmlEditorField.php +++ b/forms/HtmlEditorField.php @@ -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');