From 1166381c4770672cdbbc091f1d0183d91457a098 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Wed, 15 May 2013 19:56:48 +0100 Subject: [PATCH] Fix issue where making links clickable conflicted with formatting codes --- client/assets/css/style.css | 1 + client/assets/dev/utils.js | 2 +- client/assets/dev/view.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/assets/css/style.css b/client/assets/css/style.css index be0632c..314c05c 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 b563604..a9cf4fa 100644 --- a/client/assets/dev/view.js +++ b/client/assets/dev/view.js @@ -452,7 +452,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 = ''; -- 2.25.1