From 4963003220f618b95781887f22c0b1eaf3e4e716 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 12 Jul 2013 19:40:16 +0200 Subject: [PATCH] Fixed ckeditor issue --- .../files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js b/wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js index 0a0e436ea5..384b12a4b0 100644 --- a/wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js +++ b/wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js @@ -323,7 +323,11 @@ html = html.replace(/([\s\S]+?)<\/a>/gi, '[email=$2]$3[/email]'); // [url] - html = html.replace(/([\s\S]+?)<\/a>/gi, '[url=\'$2\']$3[/url]'); + html = html.replace(/([\s\S]+?)<\/a>/gi, function(match, x, url, text) { + if (url == text) return '[url]' + url + '[/url]'; + + return "[url='" + url + "']" + text + "[/url]"; + }); // [b] html = html.replace(/<(?:b|strong)>/gi, '[b]'); -- 2.20.1