define(['app','lodash'], function(app,_) {
    'use strict';
    app.filter("uriToLink", function() {
      var  
     //URLs starting with "www." (without // before it, or it'd re-link the ones done above).
     replacePattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim,
     //Change email addresses to mailto:: links.
     replacePattern3 = /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/gim;

     return function(text) {

        text = replaceAll(text,'https://',' ');
        text = replaceAll(text,'http://',' ');

         _.each(_.uniq(text.match(replacePattern2)), function(item) {

            text = replaceAll(text,item.trim(),"<a href=\"http://"+item.trim()+"\" target=\"_blank\">"+item+"</a>");
         });

         _.each(_.uniq(text.match(replacePattern3)), function(item) {
            text = text.replace(item, '<a href="mailto:'+item+'">'+item+'</a>');
         });
         return text;
     };
    });
    function replaceAll(string,item,replacement) {

        return string.split(item).reduce(function(prev, curr, index) {
            if (index === 0) return curr;
            else return prev + replacement + curr;
        }, '');

    }
});
@@ -104,18 +104,16 @@
      var
-  
 %0A     //
@@ -234,11 +234,15 @@
 %5B%5E%5C/
+%5C%3E
 %5D)(
+%5Cs
 www%5C
@@ -254,16 +254,25 @@
 +(%5Cb%7C$))
+($%7C%5B%5E%5C%22%5D)
 /gim,%0A  
@@ -374,16 +374,25 @@
 Z%5D%7B2,6%7D)
+(%5E%7C%5B%5E%5C%22%5D)
 /gim;%0A%0A 
@@ -448,24 +448,25 @@
 ceAll(text,'
+ 
 https://',' 
@@ -501,16 +501,17 @@
 l(text,'
+ 
 http://'
@@ -584,24 +584,59 @@
 ion(item) %7B%0A
+            item=item.substring(1);
 %0A           
@@ -731,16 +731,23 @@
 %22%3E%22+item
+.trim()
 +%22%3C/a%3E%22)
@@ -758,24 +758,25 @@
        %7D);%0A%0A
+%0A
          _.e

fix to link maker