From 4f7f105719c219601dea55c38a2ad348cc3353cf Mon Sep 17 00:00:00 2001
From: "Frederic Gaus, Flagbit GmbH & Co. KG" <gaus@flagbit.de>
Date: Mon, 21 Mar 2011 10:51:32 +0100
Subject: [PATCH] [BUGFIX] link title with wrong encoded umlauts

Use Ext.urlEncode() to encode links in TBE_EDITOR. This ensures
correct generation of strings in conjunction with UTF-8 and fixes
wrongly encoded special chars (e.g. umlauts) in the browse-links
dialog's field link-title.

Change-Id: I003f7e64f8a10b0a49d6cbe0e2e82d67d614d21a
Resolves: #M17979
Reviewed-on: http://review.typo3.org/1227
Reviewed-by: Steffen Kamper <info@sk-typo3.de>
Tested-by: Steffen Kamper <info@sk-typo3.de>
---
 typo3/jsfunc.tbe_editor.js | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/typo3/jsfunc.tbe_editor.js b/typo3/jsfunc.tbe_editor.js
index a9ec483d1b37..a69165fa79ce 100644
--- a/typo3/jsfunc.tbe_editor.js
+++ b/typo3/jsfunc.tbe_editor.js
@@ -538,11 +538,7 @@ var TBE_EDITOR = {
 	rawurlencode: function(str,maxlen) {
 		var output = str;
 		if (maxlen)	output = output.substr(0,200);
-		output = escape(output);
-		output = TBE_EDITOR.str_replace("*","%2A", output);
-		output = TBE_EDITOR.str_replace("+","%2B", output);
-		output = TBE_EDITOR.str_replace("/","%2F", output);
-		output = TBE_EDITOR.str_replace("@","%40", output);
+		output = Ext.urlEncode({'' : output});
 		return output;
 	},
 	str_replace: function(match,replace,string) {
-- 
GitLab