URLs not modifying the display text
authorDarren <darren@darrenwhitlen.com>
Sun, 30 Dec 2012 01:39:29 +0000 (01:39 +0000)
committerDarren <darren@darrenwhitlen.com>
Sun, 30 Dec 2012 01:39:29 +0000 (01:39 +0000)
client/assets/dev/view.js

index ff5b1659a618cac1f71b8a9f4f124a0c9c7faed6..2bd1921b781c8a48973d8143062b3788441141c2 100644 (file)
@@ -316,7 +316,8 @@ _kiwi.view.Panel = Backbone.View.extend({
 \r
         // Parse any links found\r
         msg.msg = msg.msg.replace(/(([A-Za-z0-9\-]+\:\/\/)|(www\.))([\w.\-]+)([a-zA-Z]{2,6})(:[0-9]+)?(\/[\w#!:.?$'()[\]*,;~+=&%@!\-\/]*)?/gi, function (url) {\r
-            var nice, extra_html = '';\r
+            var nice = url,\r
+                extra_html = '';\r
 \r
             // Add the http if no protoocol was found\r
             if (url.match(/^www\./)) {\r
@@ -324,7 +325,6 @@ _kiwi.view.Panel = Backbone.View.extend({
             }\r
 \r
             // Shorten the displayed URL if it's going to be too long\r
-            nice = url;\r
             if (nice.length > 100) {\r
                 nice = nice.substr(0, 100) + '...';\r
             }\r