nitweb: encode URIs
authorAlexandre Terrasa <alexandre@moz-code.org>
Mon, 5 Dec 2016 15:54:12 +0000 (10:54 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Mon, 5 Dec 2016 15:54:12 +0000 (10:54 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/nitweb/directives/entity/link.html
share/nitweb/javascripts/nitweb.js

index 740ea8b..ae57696 100644 (file)
@@ -1,3 +1,3 @@
 <span>
-       <a ng-href='{{mentity.web_url}}'>{{mentity.name}}</a>
+       <a ng-href='{{mentity.web_url | encodeURI}}'>{{mentity.name}}</a>
 </span>
index 6cac103..1db3fd2 100644 (file)
@@ -57,5 +57,9 @@
                                templateUrl: 'views/error.html'
                        });
                $locationProvider.html5Mode(true);
+       })
+
+       .filter('encodeURI', function() {
+               return encodeURIComponent;
        });
 })();