projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c92590
)
Improved link detection
author
Darren
<darren@darrenwhitlen.com>
Sun, 2 Sep 2012 18:51:22 +0000
(19:51 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Sun, 2 Sep 2012 18:51:22 +0000
(19:51 +0100)
client_backbone/dev/view.js
patch
|
blob
|
blame
|
history
diff --git
a/client_backbone/dev/view.js
b/client_backbone/dev/view.js
index eb5528b4d26fa0a6c8c5fdfa11e683ff8d807eb8..8e24ca754df0d08b4ff6b3f0ddfc51a461ca7499 100644
(file)
--- a/
client_backbone/dev/view.js
+++ b/
client_backbone/dev/view.js
@@
-189,6
+189,11
@@
kiwi.view.Panel = Backbone.View.extend({
msg.msg = msg.msg.replace(/((https?\:\/\/|ftp\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]*))?/gi, function (url) {
\r
var nice;
\r
\r
+ // Add the http is no protoocol was found
\r
+ if (url.match(/^www\./)) {
\r
+ url = 'http://' + url;
\r
+ }
\r
+
\r
nice = url;
\r
if (nice.length > 100) {
\r
nice = nice.substr(0, 100) + '...';
\r