From: Jack Allnutt Date: Wed, 15 May 2013 18:56:48 +0000 (+0100) Subject: Fix issue where making links clickable conflicted with formatting codes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9f2735adb7dc02fec0ff9a48f5f1e6c864d0e25e;p=KiwiIRC.git Fix issue where making links clickable conflicted with formatting codes --- diff --git a/client/assets/css/style.css b/client/assets/css/style.css index c7f563e..cd5f861 100644 --- a/client/assets/css/style.css +++ b/client/assets/css/style.css @@ -12,6 +12,7 @@ html, body { height:100%; } #kiwi p { margin:0.5em 0; } #kiwi a { color:#36C; text-decoration:none; cursor:pointer; } #kiwi a img { border:none; } +#kiwi .formatSpan a { color: inherit; background-color: inherit; text-decoration: inherit; font-style: inherit; font-weight: inherit;} /** diff --git a/client/assets/dev/utils.js b/client/assets/dev/utils.js index 9dc7e36..0e21a33 100644 --- a/client/assets/dev/utils.js +++ b/client/assets/dev/utils.js @@ -285,7 +285,7 @@ function formatIRCMsg (msg) { colours = openTags.colour.split(','); style += 'color: ' + colours[0] + ((colours[1]) ? '; background-color: ' + colours[1] + ';' : ''); } - return ''; + return ''; } }, colourMatch = function (str) { diff --git a/client/assets/dev/view.js b/client/assets/dev/view.js index afe4d35..7d60728 100644 --- a/client/assets/dev/view.js +++ b/client/assets/dev/view.js @@ -457,7 +457,7 @@ _kiwi.view.Panel = Backbone.View.extend({ // Parse any links found - msg.msg = msg.msg.replace(/(([A-Za-z0-9\-]+\:\/\/)|(www\.))([\w.\-]+)([a-zA-Z]{2,6})(:[0-9]+)?(\/[\w#!:.?$'()[\]*,;~+=&%@!\-\/]*)?/gi, function (url) { + msg.msg = msg.msg.replace(/(([A-Za-z][A-Za-z0-9\-]*\:\/\/)|(www\.))([\w.\-]+)([a-zA-Z]{2,6})(:[0-9]+)?(\/[\w#!:.?$'()[\]*,;~+=&%@!\-\/]*)?/gi, function (url) { var nice = url, extra_html = '';