From: Marcel Werk Date: Fri, 12 Jul 2013 17:40:16 +0000 (+0200) Subject: Fixed ckeditor issue X-Git-Tag: 2.0.0_Beta_5~60 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4963003220f618b95781887f22c0b1eaf3e4e716;p=GitHub%2FWoltLab%2FWCF.git Fixed ckeditor issue --- 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]');