diff options
Diffstat (limited to 'web-ui/app')
-rw-r--r-- | web-ui/app/js/helpers/monitored_ajax.js | 2 | ||||
-rw-r--r-- | web-ui/app/js/search/results_highlighter.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/web-ui/app/js/helpers/monitored_ajax.js b/web-ui/app/js/helpers/monitored_ajax.js index d05fdc4c..1cb720de 100644 --- a/web-ui/app/js/helpers/monitored_ajax.js +++ b/web-ui/app/js/helpers/monitored_ajax.js @@ -54,6 +54,8 @@ define(['page/events', 'views/i18n', 'helpers/browser'], function (events, i18n, if (xmlhttprequest.status === 302) { var redirectUrl = xmlhttprequest.getResponseHeader('Location'); browser.redirect(redirectUrl); + }else if (xmlhttprequest.status === 401) { + browser.redirect('/'); } }.bind(this)); diff --git a/web-ui/app/js/search/results_highlighter.js b/web-ui/app/js/search/results_highlighter.js index 2c7d1cc7..9e3ba167 100644 --- a/web-ui/app/js/search/results_highlighter.js +++ b/web-ui/app/js/search/results_highlighter.js @@ -40,7 +40,7 @@ define( var domIdent = data.where; if(this.attr.keywords) { _.each(this.attr.keywords, function (keyword) { - $(domIdent).highlightRegex(new RegExp('\\b' + keyword, 'i'), { + $(domIdent).highlightRegex(new RegExp(keyword, 'i'), { tagType: 'em', className: 'search-highlight' }); |