diff --git a/js/controller/ActivityController.js b/js/controller/ActivityController.js index bd09727ca..542be9195 100644 --- a/js/controller/ActivityController.js +++ b/js/controller/ActivityController.js @@ -20,7 +20,7 @@ * */ -/* global OC OCA OCP _ */ +/* global OC OCA OCP t escapeHTML */ import CommentCollection from '../legacy/commentcollection'; import CommentModel from '../legacy/commentmodel'; @@ -59,7 +59,7 @@ class ActivityController { this.activityservice.subscribe(this.$scope, function() { self.$scope.$apply(); - }) + }); } applyAtWho($target) { @@ -72,7 +72,7 @@ class ActivityController { callbacks: { remoteFilter: function(query, callback) { let uids = self.boardservice.getUsers(); - uids = uids.filter(x => x.uid.toLowerCase().includes(query.toLowerCase()) || x.displayname.toLowerCase().includes(query.toLowerCase())); + uids = uids.filter((x) => x.uid.toLowerCase().includes(query.toLowerCase()) || x.displayname.toLowerCase().includes(query.toLowerCase())); callback(uids); }, highlighter: function (li) { @@ -126,15 +126,15 @@ class ActivityController { $inserted.html('@' + $this.find('.avatar').data('username')); }); $comment.html(OCP.Comments.richToPlain($comment.html())); - $comment.html($comment.html().replace(//gi, "\n")); + $comment.html($comment.html().replace(//gi, '\n')); return $comment.text(); } static _composeHTMLMention(uid, displayName) { var avatar = '' + - '' + + '' + ''; var isCurrentUser = (uid === OC.getCurrentUser().uid); @@ -143,7 +143,7 @@ class ActivityController { '' + '' + avatar + - '' + _.escape(displayName) + '' + + '' + escapeHTML(displayName) + '' + '' + ''; } diff --git a/js/directive/contenteditable.js b/js/directive/contenteditable.js index b3d334120..abf91d8c1 100644 --- a/js/directive/contenteditable.js +++ b/js/directive/contenteditable.js @@ -49,7 +49,7 @@ app.directive('ngContenteditable', function($compile) { }); element.bind('keydown', function(event) { - if(event.which == '13' && event.shiftKey) { + if(event.which === 13 && event.shiftKey) { scope.submit(); } }); diff --git a/js/service/ActivityService.js b/js/service/ActivityService.js index 19cfbcb57..903009ed2 100644 --- a/js/service/ActivityService.js +++ b/js/service/ActivityService.js @@ -53,7 +53,7 @@ class ActivityService { let item = this.toEnhanceWithComments[index]; item.commentModel = this.commentCollection.get(item.subject_rich[1].comment); if (typeof item.commentModel !== 'undefined') { - this.toEnhanceWithComments = this.toEnhanceWithComments.filter(entry => entry.activity_id !== item.activity_id); + this.toEnhanceWithComments = this.toEnhanceWithComments.filter((entry) => entry.activity_id !== item.activity_id); } } } diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 10dedd319..62fbb19a7 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -131,7 +131,7 @@ class Application extends App { /** @var CardMapper */ $service = $this->getContainer()->query(CardMapper::class); try { - $card = $service->find((int) $name); + $service->find((int) $name); } catch (\InvalidArgumentException $e) { return false; }