From d82570096c20cc5a2a45a0645ca6575083a915a2 Mon Sep 17 00:00:00 2001 From: Ilian Ranguelov Date: Wed, 18 Nov 2015 19:49:52 +0300 Subject: [PATCH] fix #42. Uncaught URIError: URI malformed --- assets/redactor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/redactor.js b/assets/redactor.js index e1210d2..11517b0 100755 --- a/assets/redactor.js +++ b/assets/redactor.js @@ -6234,13 +6234,13 @@ linkProtocol = ""; } + text = decodeURIComponent(text); + if (text.length > this.opts.linkSize) { text = text.substring(0, this.opts.linkSize) + '...'; } - text = decodeURIComponent(text); - var regexB = "\\b"; if ($.inArray(href.slice(-1), ["/", "&", "="]) != -1)