diff --git a/src/Umbraco.Core/Services/ContentTypeService.cs b/src/Umbraco.Core/Services/ContentTypeService.cs index d80a93a4ab..31e86cd128 100644 --- a/src/Umbraco.Core/Services/ContentTypeService.cs +++ b/src/Umbraco.Core/Services/ContentTypeService.cs @@ -141,7 +141,7 @@ namespace Umbraco.Core.Services { var evtMsgs = EventMessagesFactory.Get(); - if (container.ContainedObjectType != containerObjectType) + if (container.ContainerObjectType != containerObjectType) { var ex = new InvalidOperationException("Not a " + objectTypeName + " container."); return OperationStatus.Exception(evtMsgs, ex); @@ -799,7 +799,7 @@ namespace Umbraco.Core.Services // of a different type, move them to the recycle bin, then permanently delete the content items. // The main problem with this is that for every content item being deleted, events are raised... // which we need for many things like keeping caches in sync, but we can surely do this MUCH better. - + var deletedContentTypes = new List() {contentType}; deletedContentTypes.AddRange(contentType.Descendants().OfType()); @@ -807,7 +807,7 @@ namespace Umbraco.Core.Services { _contentService.DeleteContentOfType(deletedContentType.Id); } - + repository.Delete(contentType); uow.Commit(); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/tags/tags.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/tags/tags.controller.js index a1e48bbc99..d18ff73bd5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/tags/tags.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/tags/tags.controller.js @@ -1,6 +1,6 @@ angular.module("umbraco") .controller("Umbraco.PropertyEditors.TagsController", - function ($rootScope, $scope, $log, assetsService, umbRequestHelper, angularHelper, $timeout, $element) { + function ($rootScope, $scope, $log, assetsService, umbRequestHelper, angularHelper, $timeout, $element, $sanitize) { var $typeahead; @@ -41,6 +41,7 @@ angular.module("umbraco") //Helper method to add a tag on enter or on typeahead select function addTag(tagToAdd) { + tagToAdd = $sanitize(tagToAdd); if (tagToAdd != null && tagToAdd.length > 0) { if ($scope.model.value.indexOf(tagToAdd) < 0) { $scope.model.value.push(tagToAdd);