Skip to content

Commit b5f1904

Browse files
committed
Bug fixes
1 parent 6274e40 commit b5f1904

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

OpenNote/openNote/controllers/tagController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ openNote.controller("tagController", function( $scope,
66
storageService,
77
config,
88
tagService) {
9+
$rootScope.buttons=[];
10+
911
/**
1012
* Load a note
1113
* @param note - load a note
@@ -29,7 +31,7 @@ openNote.controller("tagController", function( $scope,
2931
$scope.notes.push(note);
3032
$scope.$apply();
3133
});
32-
});
34+
});
3335
});
3436
};
3537
$scope.notes=[];

OpenNote/openNote/services/serverConfigService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ openNote.service("serverConfigService", function ($http, $q, config, userService
1111
* @return - config object promise
1212
*/
1313
this.getConfig = function(){
14-
if(sessionStorage.serverConfig===null)//if we do not have it yet, request it
14+
if(!sessionStorage.serverConfig)//if we do not have it yet, request it
1515
return requestServerConfig();
1616

1717
//make a quick promise

OpenNote/openNote/services/tagService.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ openNote.service("tagService", function ($rootScope,storageService) {
3535

3636
var addTags = function(map){
3737
tags.forEach(function(tag){
38+
tag = tag.toLowerCase();
39+
if(!tag.indexOf("#39;")||!tag.indexOf("#34;"))//Remove html and special characters
40+
return;
41+
3842
if(!map.tags[tag])
3943
return (map.tags[tag]=[id]);
4044
return map.tags[tag].push(id);
@@ -43,6 +47,7 @@ openNote.service("tagService", function ($rootScope,storageService) {
4347
map._id="tagMap";
4448
storageService.database().put(map).then(saveCallback);
4549
};
50+
4651
service.getMap().then(addTags,function(err){
4752
if(err.status==404)
4853
return addTags({tags:{}});//Nothing found nothing to delete

0 commit comments

Comments
 (0)