1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-30 15:01:55 +03:00

Added more tests to increase test coverage

This commit is contained in:
Dan Brown
2016-01-02 14:48:35 +00:00
parent f60a0c3b76
commit d3709de035
10 changed files with 97 additions and 33 deletions

View File

@ -127,7 +127,7 @@ module.exports = function (ngApp) {
}]);
ngApp.controller('BookShowController', ['$scope', '$http', '$attrs', function ($scope, $http, $attrs) {
ngApp.controller('BookShowController', ['$scope', '$http', '$attrs', '$sce', function ($scope, $http, $attrs, $sce) {
$scope.searching = false;
$scope.searchTerm = '';
$scope.searchResults = '';
@ -141,7 +141,7 @@ module.exports = function (ngApp) {
var searchUrl = '/search/book/' + $attrs.bookId;
searchUrl += '?term=' + encodeURIComponent(term);
$http.get(searchUrl).then((response) => {
$scope.searchResults = response.data;
$scope.searchResults = $sce.trustAsHtml(response.data);
});
};