diff --git a/Classes/Loader.php b/Classes/Loader.php
index b85fdd3f3a9fba4dc4a448b8e5001a0393dc880b..cc80635e7d08cd80b0fc645baee7a2139cf6b89b 100644
--- a/Classes/Loader.php
+++ b/Classes/Loader.php
@@ -301,10 +301,10 @@ class Loader {
 			var RTEarea = RTEarea || window.RTEarea;
 
 			define([\'TYPO3/CMS/Tinymce/../../../../typo3conf/ext/tinymce/tinymce_node_modules/tinymce/jquery.tinymce.min.js\'], function () {
-				$(\'.tinymce4_rte#RTEarea' . str_replace('.', '\\\\.', $this->tinymceConfiguration['configurationDataArray']['editornumber']) . '\').tinymce({
+				$(\'.tinymce4_rte#RTEarea' . strtr($this->tinymceConfiguration['configurationDataArray']['editornumber'], array('.' => '\\\\.', '\'' => '')) . '\').tinymce({
 					script_url : \'' . $this->getPath($tinymceSource, TRUE) . '\',
 					' . $this->replaceTypo3Paths($this->tinymceConfiguration['configurationData']) . ',
-					selector: \'.tinymce4_rte#RTEarea' . str_replace('.', '\\\\.', $this->tinymceConfiguration['configurationDataArray']['editornumber']) . '\'
+					selector: \'.tinymce4_rte#RTEarea' . strtr($this->tinymceConfiguration['configurationDataArray']['editornumber'], array('.' => '\\\\.', '\'' => '')) . '\'
 				});
 			});
 		';