From 7d8847953814a96aae824db61a5810895f9d0f42 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 20 Sep 2023 11:16:16 +0300 Subject: [PATCH 1/4] Don't render styles & script when not configured --- .../Pages/Public/CmsKit/Pages/Index.cshtml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml index 44ac5332b6..31fde2da6e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml @@ -7,16 +7,21 @@ @section styles{ - - + @if (!Model.ViewModel.Style.IsNullOrEmpty()) + { + + } } @section scripts{ - + @if (!Model.ViewModel.Script.IsNullOrEmpty()) + { + + } } From 28df726b9ef165f21e5dabaa840adb0d1e79fa7a Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 20 Sep 2023 14:29:29 +0300 Subject: [PATCH 2/4] Make PreventXSS configurable --- .../Volo/CmsKit/Contents/DefaultContentDto.cs | 8 + .../Volo/CmsKit/Contents/IContent.cs | 8 +- .../Volo/CmsKit/Blogs/BlogConsts.cs | 3 + .../BlogPostScrollIndexFeature.cs | 1 - .../CmsKit/Localization/Resources/ar.json | 1 + .../CmsKit/Localization/Resources/cs.json | 1 + .../CmsKit/Localization/Resources/de-DE.json | 1 + .../CmsKit/Localization/Resources/el.json | 1 + .../CmsKit/Localization/Resources/en.json | 451 +++++++++--------- .../CmsKit/Localization/Resources/es.json | 1 + .../CmsKit/Localization/Resources/fa.json | 3 +- .../CmsKit/Localization/Resources/fi.json | 1 + .../CmsKit/Localization/Resources/fr.json | 1 + .../CmsKit/Localization/Resources/hi.json | 1 + .../CmsKit/Localization/Resources/hu.json | 1 + .../CmsKit/Localization/Resources/is.json | 1 + .../CmsKit/Localization/Resources/it.json | 1 + .../CmsKit/Localization/Resources/nl.json | 1 + .../CmsKit/Localization/Resources/pl-PL.json | 1 + .../CmsKit/Localization/Resources/pt-BR.json | 1 + .../CmsKit/Localization/Resources/ro-RO.json | 1 + .../CmsKit/Localization/Resources/ru.json | 1 + .../CmsKit/Localization/Resources/sk.json | 1 + .../CmsKit/Localization/Resources/sl.json | 1 + .../CmsKit/Localization/Resources/tr.json | 1 + .../CmsKit/Localization/Resources/vi.json | 1 + .../Localization/Resources/zh-Hans.json | 1 + .../Localization/Resources/zh-Hant.json | 1 + .../Blogs/DefaultBlogFeatureProvider.cs | 15 +- .../Components/Commenting/Default.cshtml | 2 +- .../Pages/Public/CmsKit/Blogs/BlogPost.cshtml | 24 +- .../Public/CmsKit/Blogs/BlogPost.cshtml.cs | 4 + .../Pages/Public/CmsKit/Pages/Index.cshtml | 4 +- 33 files changed, 297 insertions(+), 248 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/DefaultContentDto.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/DefaultContentDto.cs index fb4b81d79b..5bddbbe470 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/DefaultContentDto.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/DefaultContentDto.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using JetBrains.Annotations; namespace Volo.CmsKit.Contents; @@ -7,4 +8,11 @@ namespace Volo.CmsKit.Contents; public class DefaultContentDto : IContent { public List ContentFragments { get; set; } + + public bool AllowHtmlTags { get; set; } = true; + + public bool PreventXSS { get; set; } = true; + + [CanBeNull] + public string ReferralLink { get; set; } = null; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContent.cs index 93165db1ae..543b67dc74 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Application.Contracts/Volo/CmsKit/Contents/IContent.cs @@ -4,5 +4,11 @@ namespace Volo.CmsKit.Contents; public interface IContent { - public List ContentFragments { get; set; } + List ContentFragments { get; set; } + + bool AllowHtmlTags { get; set; } + + bool PreventXSS { get; set; } + + string ReferralLink { get; set; } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogConsts.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogConsts.cs index 3c57836221..a811d870b6 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogConsts.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Blogs/BlogConsts.cs @@ -3,5 +3,8 @@ public class BlogConsts { public static int MaxNameLength { get; set; } = 64; + public static int MaxSlugLength { get; set; } = 64; + + public const string PreventXssFeatureName = "CmsKit.BlogPost.PreventXssFeature"; } diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/BlogPostScrollIndexFeature.cs b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/BlogPostScrollIndexFeature.cs index 9f03f973e1..132f215d93 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/BlogPostScrollIndexFeature.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/GlobalFeatures/BlogPostScrollIndexFeature.cs @@ -3,7 +3,6 @@ using Volo.Abp.GlobalFeatures; namespace Volo.CmsKit.GlobalFeatures; - [GlobalFeatureName(Name)] public class BlogPostScrollIndexFeature : GlobalFeature { diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ar.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ar.json index 3119bf618c..747bb8c53a 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ar.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ar.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "التقييمات", "CmsKit.Reactions": "تفاعلات", "CmsKit.Tags": "العلامات", + "CmsKit.BlogPost.PreventXssFeature": "منع XSS", "CmsKit:0002": "المحتوى موجود بالفعل!", "CmsKit:0003": "الكيان {0} غير قابل للعلامة.", "CmsKit:Blog:0001": "slug المحدد ({Slug}) موجود بالفعل!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/cs.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/cs.json index 8ae9479b06..a38883b40f 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/cs.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/cs.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Hodnocení", "CmsKit.Reactions": "Reakce", "CmsKit.Tags": "Tagy", + "CmsKit.BlogPost.PreventXssFeature": "Zabraňte XSS", "CmsKit:0002": "Obsah již existuje!", "CmsKit:0003": "Entitu {0} nelze označit.", "CmsKit:Blog:0001": "Daný slimák ({Slug}) již existuje!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de-DE.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de-DE.json index 857f7f1e1a..9fbecee488 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de-DE.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/de-DE.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Bewertungen", "CmsKit.Reactions": "Reaktionen", "CmsKit.Tags": "Stichworte", + "CmsKit.BlogPost.PreventXssFeature": "XSS-Prävention", "CmsKit:0002": "Inhalt ist bereits vorhanden!", "CmsKit:0003": "Die Entität {0} kann nicht mit Tags versehen werden.", "CmsKit:Blog:0001": "Die angegebene Schnecke ({Slug}) existiert bereits!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/el.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/el.json index 7a838b120a..73986c9912 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/el.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/el.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Βαθμολογία", "CmsKit.Reactions": "Αντιδράσεις", "CmsKit.Tags": "Ετικέτες", + "CmsKit.BlogPost.PreventXssFeature": "Αποτροπή XSS", "CmsKit:0002": "Το περιεχόμενο υπάρχει ήδη!", "CmsKit:0003": "Η οντότητα {0} δεν μπορεί να επισημανθεί.", "CmsKit:Blog:0001": "Το δεδομένο slug ({Slug}) υπάρχει ήδη!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json index 327f924753..a5adbf0a05 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json @@ -1,228 +1,229 @@ { "culture": "en", - "texts": { - "AddSubMenuItem": "Add Sub Menu Item", - "AreYouSure": "Are You Sure?", - "BlogDeletionConfirmationMessage": "The blog '{0}' will be deleted. Are you sure?", - "BlogFeatureNotAvailable": "This feature is not available now. Enable with 'GlobalFeatureManager' to use it.", - "BlogId": "Blog", - "BlogPostDeletionConfirmationMessage": "The blog post '{0}' will be deleted. Are you sure?", - "BlogPosts": "Blog Posts", - "Blogs": "Blogs", - "ChoosePreference": "Choose Preference...", - "Cms": "CMS", - "CmsKit.Comments": "Comments", - "CmsKit.Ratings": "Ratings", - "CmsKit.Reactions": "Reactions", - "CmsKit.Tags": "Tags", - "CmsKit:0002": "Content already exists!", - "CmsKit:0003": "The entity {0} is not taggable.", - "CmsKit:Blog:0001": "The given slug ({Slug}) already exists!", - "CmsKit:BlogPost:0001": "The given slug already exists!", - "CmsKit:Comments:0001": "The entity {EntityType} is not commentable.", - "CmsKit:Media:0001": "'{Name}' is not a valid media name.", - "CmsKit:Media:0002": "The entity can't have media.", - "CmsKit:Page:0001": "The given url ({Slug}) already exists. Please try with different url.", - "CmsKit:Rating:0001": "The entity {EntityType} can't be rated.", - "CmsKit:Reaction:0001": "The entity {EntityType} can't have reactions.", - "CmsKit:Tag:0002": "The entity is not taggable!", - "CommentAuthorizationExceptionMessage": "Those comments are not allowed for public display.", - "CommentDeletionConfirmationMessage": "This comment and all replies will be deleted!", - "Comments": "Comments", - "Content": "Content", - "ContentDeletionConfirmationMessage": "Are you sure to delete this content?", - "Contents": "Contents", - "CoverImage": "Cover Image", - "CreateBlogPostPage": "New Blog Post", - "CreationTime": "Creation Time", - "Delete": "Delete", - "Detail": "Detail", - "Details": "Details", - "DisplayName": "Display Name", - "DoYouPreferAdditionalEmails": "Do you prefer additional emails?", - "Edit": "Edit", - "EndDate": "End Date", - "EntityId": "Entity Id", - "EntityType": "Entity Type", - "ExportCSV": "Export CSV", - "Features": "Features", - "GenericDeletionConfirmationMessage": "Are you sure to delete '{0}'?", - "IsActive": "Active", - "LastModification": "Last Modification", - "LastModificationTime": "Last Modification Time", - "LoginToAddComment": "Login to add comment", - "LoginToRate": "Login to rate", - "LoginToReact": "Login to react", - "LoginToReply": "Login to reply", - "MainMenu": "Main Menu", - "MakeMainMenu": "Make Main Menu", - "Menu:CMS": "CMS", - "Menus": "Menus", - "MenuDeletionConfirmationMessage": "The menu '{0}' will be deleted. Are you sure?", - "MenuItemDeletionConfirmationMessage": "Are sure to delete this menu item?", - "MenuItemMoveConfirmMessage": "Are you sure you want to move '{0}' under '{1}'?", - "MenuItems": "Menu Items", - "Message": "Message", - "MessageDeletionConfirmationMessage": "This comment will be deleted completely.", - "NewBlog": "New Blog", - "NewBlogPost": "New Blog Post", - "NewMenu": "New Menu", - "NewMenuItem": "New Root Menu Item", - "NewPage": "New Page", - "NewTag": "New Tag", - "NoMenuItems": "There is no menu item yet!", - "OK": "OK", - "PageDeletionConfirmationMessage": "Are you sure to delete this page?", - "PageId": "Page", - "Pages": "Pages", - "PageSlugInformation": "Slug is used on url. Your url will be '/{{slug}}'.", - "Permission:BlogManagement": "Blog Management", - "Permission:BlogManagement.Create": "Create", - "Permission:BlogManagement.Delete": "Delete", - "Permission:BlogManagement.Features": "Features", - "Permission:BlogManagement.Update": "Update", - "Permission:BlogPostManagement": "Blog Post Management", - "Permission:BlogPostManagement.Create": "Create", - "Permission:BlogPostManagement.Delete": "Delete", - "Permission:BlogPostManagement.Update": "Update", - "Permission:BlogPostManagement.Publish": "Publish", - "Permission:CmsKit": "CmsKit Admin", - "Permission:Comments": "Comment Management", - "Permission:Comments.Delete": "Delete", - "Permission:Contents": "Content Management", - "Permission:Contents.Create": "Create Content", - "Permission:Contents.Delete": "Delete Content", - "Permission:Contents.Update": "Update Content", - "Permission:MediaDescriptorManagement": "Media Management", - "Permission:MediaDescriptorManagement:Create": "Create", - "Permission:MediaDescriptorManagement:Delete": "Delete", - "Permission:MenuItemManagement": "Menu Item Management", - "Permission:MenuItemManagement.Create": "Create", - "Permission:MenuItemManagement.Delete": "Delete", - "Permission:MenuItemManagement.Update": "Update", - "Permission:MenuManagement": "Menu Management", - "Permission:MenuManagement.Create": "Create", - "Permission:MenuManagement.Delete": "Delete", - "Permission:MenuManagement.Update": "Update", - "Permission:Menus": "Menu Management", - "Permission:Menus.Create": "Create", - "Permission:Menus.Delete": "Delete", - "Permission:Menus.Update": "Update", - "Permission:PageManagement": "Page Management", - "Permission:PageManagement:Create": "Create", - "Permission:PageManagement:Delete": "Delete", - "Permission:PageManagement:Update": "Update", - "Permission:PageManagement:SetAsHomePage": "Set As Home Page", - "Permission:TagManagement": "Tag Management", - "Permission:TagManagement.Create": "Create", - "Permission:TagManagement.Delete": "Delete", - "Permission:TagManagement.Update": "Update", - "Permission:GlobalResources": "Global Resources", - "Permission:CmsKitPublic": "CmsKit Public", - "Permission:Comments.DeleteAll": "Delete All", - "PickYourReaction": "Pick your reaction", - "Rating": "Rating", - "RatingUndoMessage": "Your rating will be undo.", - "Reactions": "Reactions", - "Read": "Read", - "RepliesToThisComment": "Replies to this comment", - "Reply": "Reply", - "ReplyTo": "Reply to", - "SamplePageMessage": "A sample page for the Pro module", - "SaveChanges": "Save Changes", - "Script": "Script", - "SelectAll": "Select All", - "Send": "Send", - "SendMessage": "Send Message", - "SelectedAuthor": "Author", - "ShortDescription": "Short description", - "Slug": "Slug", - "Source": "Source", - "SourceUrl": "Source Url", - "Star": "Star", - "StartDate": "Start Date", - "Style": "Style", - "Subject": "Subject", - "SubjectPlaceholder": "Please type a subject", - "Submit": "Submit", - "Subscribe": "Subscribe", - "SuccessfullySaved": "Successfully saved!", - "TagDeletionConfirmationMessage": "Are you sure to delete '{0}' tag?", - "Tags": "Tags", - "Text": "Text", - "ThankYou": "Thank you", - "Title": "Title", - "Undo": "Undo", - "Update": "Update", - "UpdatePreferenceSuccessMessage": "Your preferences have been saved.", - "UpdateYourEmailPreferences": "Update your email preferences", - "UnMakeMainMenu": "Unmake Main Menu", - "UploadFailedMessage": "Upload failed.", - "UserId": "User Id", - "Username": "Username", - "YourComment": "Your comment", - "YourEmailAddress": "Your e-mail address", - "YourFullName": "Your full name", - "YourMessage": "Your Message", - "YourReply": "Your reply", - "MarkdownSupported": "Markdown supported.", - "GlobalResources": "Global Resources", - "SavedSuccessfully": "Saved successfully", - "CmsKit.BlogPost.Status.0": "Draft", - "CmsKit.BlogPost.Status.1": "Published", - "CmsKit.BlogPost.Status.2": "Waiting for review", - "BlogPostPublishConfirmationMessage": "Are you sure to publish the blog post \"{0}\"?", - "SuccessfullyPublished": "Successfully published!", - "Draft": "Draft", - "Publish": "Publish", - "BlogPostDraftConfirmationMessage": "Are you sure to set the blog post \"{0}\" as draft?", - "BlogPostSendToReviewConfirmationMessage": "Are you sure to send the blog post \"{0}\" to admin review for publishing?", - "SaveAsDraft": "Save as draft", - "SendToReview": "Send to review", - "SendToReviewToPublish": "Send to review to publish", - "BlogPostSendToReviewSuccessMessage": "The blog post \"{0}\" has been sent to admin review for publishing.", - "HasBlogPostWaitingForReviewMessage": "You have a blog post waiting for review. Click to list.", - "SelectAStatus": "Select a status", - "Status": "Status", - "CmsKit.BlogPost.ScrollIndex": "Quick navigation bar in blog posts", - "Add": "Add", - "AddWidget": "Add Widget", - "PleaseConfigureWidgets": "Please configure widgets", - "SelectAnAuthor": "Select an Author", - "InThisDocument": "In This Document", - "GoToTop": "Go To Top", - "SetAsHomePage": "Change Home Page Status", - "CompletedSettingAsHomePage": "Set as home page", - "IsHomePage": "Is Home Page", - "RemovedSettingAsHomePage": "Removed setting the home page", - "Feature:CmsKitGroup": "Cms Kit", - "Feature:BlogEnable": "Blogpost", - "Feature:BlogEnableDescription": "CMS Kit's blogpost system that allows create blogs and posts dynamically in the application.", - "Feature:CommentEnable": "Commenting", - "Feature:CommentEnableDescription": "CMS Kit's comment system allows commenting on entities such as BlogPost.", - "Feature:GlobalResourceEnable": "Global resourcing", - "Feature:GlobalResourceEnableDescription": "CMS Kit's global resoruces feature that allows managing global styles & scripts.", - "Feature:MenuEnable": "Menu", - "Feature:MenuEnableDescription": "CMS Kit's dynamic menu system that allows adding/removing application menus dynamically.", - "Feature:PageEnable": "Paging", - "Feature:PageEnableDescription": "CMS Kit's page system that allows creating static pages with specific URL.", - "Feature:RatingEnable": "Rating", - "Feature:RatingEnableDescription": "CMS Kit's rating system that allows users to rate entities such as BlogPost.", - "Feature:ReactionEnable": "Reaction", - "Feature:ReactionEnableDescription": "CMS Kit's reaction system that allows users to send reactions to entities such as BlogPost, Comments, etc.", - "Feature:TagEnable": "Taging", - "Feature:TagEnableDescription": "CMS Kit's tag system that allows tagging entities such as BlogPost.", - "DeleteBlogPostMessage": "The blog will be deleted. Are you sure?", - "CaptchaCode": "Captcha code", - "CommentTextRequired": "Comment is required", - "CaptchaCodeErrorMessage": "The answer you entered for the CAPTCHA was not correct. Please try again", - "CaptchaCodeMissingMessage": "The captcha code is missing!", - "UnAllowedExternalUrlMessage": "You included an unallowed external URL. Please try again without the external URL.", - "URL": "URL", - "PopularTags": "Popular Tags", - "RemoveCoverImageConfirmationMessage": "Are you sure you want to remove the cover image?", - "RemoveCoverImage": "Remove cover image", - "CssClass": "CSS Class", - "TagsHelpText": "Tags should be comma-separated (e.g.: tag1, tag2, tag3)" - } + "texts": { + "AddSubMenuItem": "Add Sub Menu Item", + "AreYouSure": "Are You Sure?", + "BlogDeletionConfirmationMessage": "The blog '{0}' will be deleted. Are you sure?", + "BlogFeatureNotAvailable": "This feature is not available now. Enable with 'GlobalFeatureManager' to use it.", + "BlogId": "Blog", + "BlogPostDeletionConfirmationMessage": "The blog post '{0}' will be deleted. Are you sure?", + "BlogPosts": "Blog Posts", + "Blogs": "Blogs", + "ChoosePreference": "Choose Preference...", + "Cms": "CMS", + "CmsKit.Comments": "Comments", + "CmsKit.Ratings": "Ratings", + "CmsKit.Reactions": "Reactions", + "CmsKit.Tags": "Tags", + "CmsKit:0002": "Content already exists!", + "CmsKit:0003": "The entity {0} is not taggable.", + "CmsKit:Blog:0001": "The given slug ({Slug}) already exists!", + "CmsKit:BlogPost:0001": "The given slug already exists!", + "CmsKit:Comments:0001": "The entity {EntityType} is not commentable.", + "CmsKit:Media:0001": "'{Name}' is not a valid media name.", + "CmsKit:Media:0002": "The entity can't have media.", + "CmsKit:Page:0001": "The given url ({Slug}) already exists. Please try with different url.", + "CmsKit:Rating:0001": "The entity {EntityType} can't be rated.", + "CmsKit:Reaction:0001": "The entity {EntityType} can't have reactions.", + "CmsKit:Tag:0002": "The entity is not taggable!", + "CommentAuthorizationExceptionMessage": "Those comments are not allowed for public display.", + "CommentDeletionConfirmationMessage": "This comment and all replies will be deleted!", + "Comments": "Comments", + "Content": "Content", + "ContentDeletionConfirmationMessage": "Are you sure to delete this content?", + "Contents": "Contents", + "CoverImage": "Cover Image", + "CreateBlogPostPage": "New Blog Post", + "CreationTime": "Creation Time", + "Delete": "Delete", + "Detail": "Detail", + "Details": "Details", + "DisplayName": "Display Name", + "DoYouPreferAdditionalEmails": "Do you prefer additional emails?", + "Edit": "Edit", + "EndDate": "End Date", + "EntityId": "Entity Id", + "EntityType": "Entity Type", + "ExportCSV": "Export CSV", + "Features": "Features", + "GenericDeletionConfirmationMessage": "Are you sure to delete '{0}'?", + "IsActive": "Active", + "LastModification": "Last Modification", + "LastModificationTime": "Last Modification Time", + "LoginToAddComment": "Login to add comment", + "LoginToRate": "Login to rate", + "LoginToReact": "Login to react", + "LoginToReply": "Login to reply", + "MainMenu": "Main Menu", + "MakeMainMenu": "Make Main Menu", + "Menu:CMS": "CMS", + "Menus": "Menus", + "MenuDeletionConfirmationMessage": "The menu '{0}' will be deleted. Are you sure?", + "MenuItemDeletionConfirmationMessage": "Are sure to delete this menu item?", + "MenuItemMoveConfirmMessage": "Are you sure you want to move '{0}' under '{1}'?", + "MenuItems": "Menu Items", + "Message": "Message", + "MessageDeletionConfirmationMessage": "This comment will be deleted completely.", + "NewBlog": "New Blog", + "NewBlogPost": "New Blog Post", + "NewMenu": "New Menu", + "NewMenuItem": "New Root Menu Item", + "NewPage": "New Page", + "NewTag": "New Tag", + "NoMenuItems": "There is no menu item yet!", + "OK": "OK", + "PageDeletionConfirmationMessage": "Are you sure to delete this page?", + "PageId": "Page", + "Pages": "Pages", + "PageSlugInformation": "Slug is used on url. Your url will be '/{{slug}}'.", + "Permission:BlogManagement": "Blog Management", + "Permission:BlogManagement.Create": "Create", + "Permission:BlogManagement.Delete": "Delete", + "Permission:BlogManagement.Features": "Features", + "Permission:BlogManagement.Update": "Update", + "Permission:BlogPostManagement": "Blog Post Management", + "Permission:BlogPostManagement.Create": "Create", + "Permission:BlogPostManagement.Delete": "Delete", + "Permission:BlogPostManagement.Update": "Update", + "Permission:BlogPostManagement.Publish": "Publish", + "Permission:CmsKit": "CmsKit Admin", + "Permission:Comments": "Comment Management", + "Permission:Comments.Delete": "Delete", + "Permission:Contents": "Content Management", + "Permission:Contents.Create": "Create Content", + "Permission:Contents.Delete": "Delete Content", + "Permission:Contents.Update": "Update Content", + "Permission:MediaDescriptorManagement": "Media Management", + "Permission:MediaDescriptorManagement:Create": "Create", + "Permission:MediaDescriptorManagement:Delete": "Delete", + "Permission:MenuItemManagement": "Menu Item Management", + "Permission:MenuItemManagement.Create": "Create", + "Permission:MenuItemManagement.Delete": "Delete", + "Permission:MenuItemManagement.Update": "Update", + "Permission:MenuManagement": "Menu Management", + "Permission:MenuManagement.Create": "Create", + "Permission:MenuManagement.Delete": "Delete", + "Permission:MenuManagement.Update": "Update", + "Permission:Menus": "Menu Management", + "Permission:Menus.Create": "Create", + "Permission:Menus.Delete": "Delete", + "Permission:Menus.Update": "Update", + "Permission:PageManagement": "Page Management", + "Permission:PageManagement:Create": "Create", + "Permission:PageManagement:Delete": "Delete", + "Permission:PageManagement:Update": "Update", + "Permission:PageManagement:SetAsHomePage": "Set As Home Page", + "Permission:TagManagement": "Tag Management", + "Permission:TagManagement.Create": "Create", + "Permission:TagManagement.Delete": "Delete", + "Permission:TagManagement.Update": "Update", + "Permission:GlobalResources": "Global Resources", + "Permission:CmsKitPublic": "CmsKit Public", + "Permission:Comments.DeleteAll": "Delete All", + "PickYourReaction": "Pick your reaction", + "Rating": "Rating", + "RatingUndoMessage": "Your rating will be undo.", + "Reactions": "Reactions", + "Read": "Read", + "RepliesToThisComment": "Replies to this comment", + "Reply": "Reply", + "ReplyTo": "Reply to", + "SamplePageMessage": "A sample page for the Pro module", + "SaveChanges": "Save Changes", + "Script": "Script", + "SelectAll": "Select All", + "Send": "Send", + "SendMessage": "Send Message", + "SelectedAuthor": "Author", + "ShortDescription": "Short description", + "Slug": "Slug", + "Source": "Source", + "SourceUrl": "Source Url", + "Star": "Star", + "StartDate": "Start Date", + "Style": "Style", + "Subject": "Subject", + "SubjectPlaceholder": "Please type a subject", + "Submit": "Submit", + "Subscribe": "Subscribe", + "SuccessfullySaved": "Successfully saved!", + "TagDeletionConfirmationMessage": "Are you sure to delete '{0}' tag?", + "Tags": "Tags", + "Text": "Text", + "ThankYou": "Thank you", + "Title": "Title", + "Undo": "Undo", + "Update": "Update", + "UpdatePreferenceSuccessMessage": "Your preferences have been saved.", + "UpdateYourEmailPreferences": "Update your email preferences", + "UnMakeMainMenu": "Unmake Main Menu", + "UploadFailedMessage": "Upload failed.", + "UserId": "User Id", + "Username": "Username", + "YourComment": "Your comment", + "YourEmailAddress": "Your e-mail address", + "YourFullName": "Your full name", + "YourMessage": "Your Message", + "YourReply": "Your reply", + "MarkdownSupported": "Markdown supported.", + "GlobalResources": "Global Resources", + "SavedSuccessfully": "Saved successfully", + "CmsKit.BlogPost.Status.0": "Draft", + "CmsKit.BlogPost.Status.1": "Published", + "CmsKit.BlogPost.Status.2": "Waiting for review", + "BlogPostPublishConfirmationMessage": "Are you sure to publish the blog post \"{0}\"?", + "SuccessfullyPublished": "Successfully published!", + "Draft": "Draft", + "Publish": "Publish", + "BlogPostDraftConfirmationMessage": "Are you sure to set the blog post \"{0}\" as draft?", + "BlogPostSendToReviewConfirmationMessage": "Are you sure to send the blog post \"{0}\" to admin review for publishing?", + "SaveAsDraft": "Save as draft", + "SendToReview": "Send to review", + "SendToReviewToPublish": "Send to review to publish", + "BlogPostSendToReviewSuccessMessage": "The blog post \"{0}\" has been sent to admin review for publishing.", + "HasBlogPostWaitingForReviewMessage": "You have a blog post waiting for review. Click to list.", + "SelectAStatus": "Select a status", + "Status": "Status", + "CmsKit.BlogPost.ScrollIndex": "Quick navigation bar in blog posts", + "CmsKit.BlogPost.PreventXssFeature": "Prevent XSS", + "Add": "Add", + "AddWidget": "Add Widget", + "PleaseConfigureWidgets": "Please configure widgets", + "SelectAnAuthor": "Select an Author", + "InThisDocument": "In This Document", + "GoToTop": "Go To Top", + "SetAsHomePage": "Change Home Page Status", + "CompletedSettingAsHomePage": "Set as home page", + "IsHomePage": "Is Home Page", + "RemovedSettingAsHomePage": "Removed setting the home page", + "Feature:CmsKitGroup": "Cms Kit", + "Feature:BlogEnable": "Blogpost", + "Feature:BlogEnableDescription": "CMS Kit's blogpost system that allows create blogs and posts dynamically in the application.", + "Feature:CommentEnable": "Commenting", + "Feature:CommentEnableDescription": "CMS Kit's comment system allows commenting on entities such as BlogPost.", + "Feature:GlobalResourceEnable": "Global resourcing", + "Feature:GlobalResourceEnableDescription": "CMS Kit's global resoruces feature that allows managing global styles & scripts.", + "Feature:MenuEnable": "Menu", + "Feature:MenuEnableDescription": "CMS Kit's dynamic menu system that allows adding/removing application menus dynamically.", + "Feature:PageEnable": "Paging", + "Feature:PageEnableDescription": "CMS Kit's page system that allows creating static pages with specific URL.", + "Feature:RatingEnable": "Rating", + "Feature:RatingEnableDescription": "CMS Kit's rating system that allows users to rate entities such as BlogPost.", + "Feature:ReactionEnable": "Reaction", + "Feature:ReactionEnableDescription": "CMS Kit's reaction system that allows users to send reactions to entities such as BlogPost, Comments, etc.", + "Feature:TagEnable": "Taging", + "Feature:TagEnableDescription": "CMS Kit's tag system that allows tagging entities such as BlogPost.", + "DeleteBlogPostMessage": "The blog will be deleted. Are you sure?", + "CaptchaCode": "Captcha code", + "CommentTextRequired": "Comment is required", + "CaptchaCodeErrorMessage": "The answer you entered for the CAPTCHA was not correct. Please try again", + "CaptchaCodeMissingMessage": "The captcha code is missing!", + "UnAllowedExternalUrlMessage": "You included an unallowed external URL. Please try again without the external URL.", + "URL": "URL", + "PopularTags": "Popular Tags", + "RemoveCoverImageConfirmationMessage": "Are you sure you want to remove the cover image?", + "RemoveCoverImage": "Remove cover image", + "CssClass": "CSS Class", + "TagsHelpText": "Tags should be comma-separated (e.g.: tag1, tag2, tag3)" + } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/es.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/es.json index 8e8750e530..df713377fa 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/es.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/es.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Calificaciones", "CmsKit.Reactions": "Reacciones", "CmsKit.Tags": "Etiquetas", + "CmsKit.BlogPost.PreventXssFeature": "Prevenir ataques XSS", "CmsKit:0002": "¡El contenido ya existe!", "CmsKit:0003": "La entidad {0} no se puede etiquetar.", "CmsKit:Blog:0001": "¡La babosa dada ({Slug}) ya existe!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fa.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fa.json index 855b6d091d..57ea83c2d3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fa.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fa.json @@ -181,6 +181,7 @@ "HasBlogPostWaitingForReviewMessage": "شما یک پست وبلاگ دارید که منتظر بررسی است. برای لیست کلیک کنید.", "SelectAStatus": "انتخاب وضعیت", "Status": "وضعیت", - "CmsKit.BlogPost.ScrollIndex": "نوار پیمایش سریع در پست های وبلاگ" + "CmsKit.BlogPost.ScrollIndex": "نوار پیمایش سریع در پست های وبلاگ", + "CmsKit.BlogPost.PreventXssFeature": "جلوگیری از XSS" } } \ No newline at end of file diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fi.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fi.json index 48f961cd71..2cbecff6f2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fi.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fi.json @@ -185,6 +185,7 @@ "SelectAStatus": "Valitse tila", "Status": "Tila", "CmsKit.BlogPost.ScrollIndex": "Pikanavigointipalkki blogikirjoituksissa", + "CmsKit.BlogPost.PreventXssFeature": "Estä XSS", "Add": "Lisää", "AddWidget": "Lisää widget", "PleaseConfigureWidgets": "Määritä widgetit", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fr.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fr.json index 5c789e996e..ad7df5cef7 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fr.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/fr.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Évaluations", "CmsKit.Reactions": "Réactions", "CmsKit.Tags": "Mots clés", + "CmsKit.BlogPost.PreventXssFeature": "Empêcher les attaques XSS", "CmsKit:0002": "Le contenu existe déjà!", "CmsKit:0003": "L'entité {0} ne peut pas être taguée.", "CmsKit:Blog:0001": "Le slug donné ({Slug}) existe déjà!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hi.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hi.json index 8f69f2e25f..3b7700b490 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hi.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hi.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "रेटिंग्स", "CmsKit.Reactions": "प्रतिक्रियाओं", "CmsKit.Tags": "टैग", + "CmsKit.BlogPost.PreventXssFeature": "XSS रोकें", "CmsKit:0002": "सामग्री पहले से मौजूद है!", "CmsKit:0003": "इकाई {0} टैग करने योग्य नहीं है।", "CmsKit:Blog:0001": "दिया गया स्लग ({Slug}) पहले से मौजूद है!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json index 5497c9ec98..c262b42adf 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json @@ -182,6 +182,7 @@ "SelectAStatus": "Válasszon állapotot", "Status": "Állapot", "CmsKit.BlogPost.ScrollIndex": "Gyors navigációs sáv a blogbejegyzésekben", + "CmsKit.BlogPost.PreventXssFeature": "XSS megelőzése", "Add": "Hozzáadás", "AddWidget": "Widget hozzáadása", "PleaseConfigureWidgets": "Kérjük, állítsa be a widgeteket", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/is.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/is.json index 7107434304..762dd4f994 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/is.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/is.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Skor", "CmsKit.Reactions": "Viðbrögð", "CmsKit.Tags": "Tög", + "CmsKit.BlogPost.PreventXssFeature": "Fyrirbyggja XSS árásir", "CmsKit:0002": "Efni nú þegar til!", "CmsKit:0003": "Ekki hægt að tagga einingu {0}", "CmsKit:Blog:0001": "Uppgefin snigill ({Slug}) er þegar til!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/it.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/it.json index 60c8d13744..95923c8937 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/it.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/it.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Valutazioni", "CmsKit.Reactions": "Reazioni", "CmsKit.Tags": "Tag", + "CmsKit.BlogPost.PreventXssFeature": "Prevenzione XSS", "CmsKit:0002": "Il contenuto esiste già!", "CmsKit:0003": "L'entità {0} non è codificabile.", "CmsKit:Blog:0001": "Lo slug specificato ({Slug}) esiste già!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/nl.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/nl.json index 39779d1d57..1e0e6ee98d 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/nl.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/nl.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Beoordelingen", "CmsKit.Reactions": "Reacties", "CmsKit.Tags": "Tags", + "CmsKit.BlogPost.PreventXssFeature": "XSS-functie voorkomen", "CmsKit:0002": "Inhoud bestaat al!", "CmsKit:0003": "De entiteit {0} kan niet worden getagd.", "CmsKit:Blog:0001": "De opgegeven slug ({Slug}) bestaat al!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pl-PL.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pl-PL.json index 5a2ed06a5d..afd3447867 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pl-PL.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pl-PL.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Oceny", "CmsKit.Reactions": "Reakcje", "CmsKit.Tags": "Tagi", + "CmsKit.BlogPost.PreventXssFeature": "Zapobiegaj atakom XSS", "CmsKit:0002": "Treść już istnieje!", "CmsKit:0003": "Jednostka {0} nie może być otagowana.", "CmsKit:Blog:0001": "Podany ślimak ({Slug}) już istnieje!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pt-BR.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pt-BR.json index be7cbe0775..3b49284b58 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pt-BR.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/pt-BR.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Avaliações", "CmsKit.Reactions": "Reações", "CmsKit.Tags": "Tag", + "CmsKit.BlogPost.PreventXssFeature": "Prevenir recurso XSS", "CmsKit:0002": "O conteúdo já existe!", "CmsKit:0003": "A entidade {0} não pode ser etiquetada.", "CmsKit:Blog:0001": "O slug fornecido ({Slug}) já existe!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ro-RO.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ro-RO.json index 9cd519bb53..6f434903d1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ro-RO.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ro-RO.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Evaluări", "CmsKit.Reactions": "Reacţii", "CmsKit.Tags": "Etichete", + "CmsKit.BlogPost.PreventXssFeature": "Prevenirea Xss", "CmsKit:0002": "Conţinutul există deja!", "CmsKit:0003": "Entitatea {0} nu este etichetabilă.", "CmsKit:Blog:0001": "Slugul ({Slug}) există deja!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ru.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ru.json index f95ee910e4..39fcd1f102 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ru.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/ru.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Рейтинги", "CmsKit.Reactions": "Реакции", "CmsKit.Tags": "Теги", + "CmsKit.BlogPost.PreventXssFeature": "Защита от XSS", "CmsKit:0002": "Контент уже существует!", "CmsKit:0003": "Сущность {0} не может быть помечена.", "CmsKit:Blog:0001": "Указанный слаг ({Slug}) уже существует!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sk.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sk.json index 2cf9410ca9..95620abc23 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sk.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sk.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Hodnotenia", "CmsKit.Reactions": "Reakcie", "CmsKit.Tags": "Tagy", + "CmsKit.BlogPost.PreventXssFeature": "Zabraňte XSS", "CmsKit:0002": "Obsah už existuje!", "CmsKit:0003": "Entite {0} nie je možné priradiť tag.", "CmsKit:Blog:0001": "Zadaný slug ({Slug}) už existuje!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sl.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sl.json index 22f252ea51..588f9c67a2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sl.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/sl.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Ocene", "CmsKit.Reactions": "Reakcije", "CmsKit.Tags": "Oznake", + "CmsKit.BlogPost.PreventXssFeature": "Prepreči XSS", "CmsKit:0002": "Vsebina že obstaja!", "CmsKit:0003": "Entiteta {0} ni mogoče označiti.", "CmsKit:Blog:0001": "Podani polž ({Slug}) že obstaja!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json index ff1ab72ae2..265ed8c18e 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json @@ -187,6 +187,7 @@ "RemoveCoverImageConfirmationMessage": "Kapak resmini kaldırmak istediğinize emin misiniz?", "RemoveCoverImage": "Kapak resmini kaldır", "CmsKit.BlogPost.ScrollIndex": "Blog yazılarında hızlı gezinme çubuğu", + "CmsKit.BlogPost.PreventXssFeature": "XSS önleme özelliği", "Add": "Ekle", "AddWidget": "Widget Ekle", "PleaseConfigureWidgets": "Lütfen widget'leri yapılandırın", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/vi.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/vi.json index a581da6362..17f9ecaf5c 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/vi.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/vi.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "Xếp hạng", "CmsKit.Reactions": "Phản ứng", "CmsKit.Tags": "Thẻ", + "CmsKit.BlogPost.PreventXssFeature": "Ngăn chặn XSS", "CmsKit:0002": "Nội dung đã tồn tại!", "CmsKit:0003": "Thực thể {0} không thể gắn thẻ.", "CmsKit:Blog:0001": "Sên đã cho ({Slug}) đã tồn tại!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json index a827923981..7a98fd4e22 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json @@ -185,6 +185,7 @@ "SelectAStatus": "选择一个状态", "Status": "状态", "CmsKit.BlogPost.ScrollIndex": "博客文章快速导航栏", + "CmsKit.BlogPost.PreventXssFeature": "防止XSS攻击", "Add": "添加", "AddWidget": "添加组件", "PleaseConfigureWidgets": "请配置组件", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hant.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hant.json index 91a742deba..303b0cc1ad 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hant.json +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hant.json @@ -15,6 +15,7 @@ "CmsKit.Ratings": "評分", "CmsKit.Reactions": "反應", "CmsKit.Tags": "標籤", + "CmsKit.BlogPost.PreventXssFeature": "防止XSS攻擊", "CmsKit:0002": "內容已經存在!", "CmsKit:0003": "實體 {0} 不可標記.", "CmsKit:Blog:0001": "給定的slug ({Slug}) 已經存在!", diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultBlogFeatureProvider.cs b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultBlogFeatureProvider.cs index 1eec1100f2..b24e992cf3 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultBlogFeatureProvider.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Blogs/DefaultBlogFeatureProvider.cs @@ -11,12 +11,13 @@ public class DefaultBlogFeatureProvider : IDefaultBlogFeatureProvider, ITransien public virtual Task> GetDefaultFeaturesAsync(Guid blogId) { return Task.FromResult(new List - { - new BlogFeature(blogId, CommentsFeature.Name), - new BlogFeature(blogId, ReactionsFeature.Name), - new BlogFeature(blogId, RatingsFeature.Name), - new BlogFeature(blogId, TagsFeature.Name), - new BlogFeature(blogId, BlogPostScrollIndexFeature.Name) - }); + { + new BlogFeature(blogId, CommentsFeature.Name), + new BlogFeature(blogId, ReactionsFeature.Name), + new BlogFeature(blogId, RatingsFeature.Name), + new BlogFeature(blogId, TagsFeature.Name), + new BlogFeature(blogId, BlogPostScrollIndexFeature.Name), + new BlogFeature(blogId, BlogConsts.PreventXssFeatureName) + }); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml index d4e09e9b61..8829df73c5 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml @@ -204,7 +204,7 @@ { @foreach (var reply in comment.Replies) { -
+
@GetCommentTitle(reply.Author, reply.CreationTime).Invoke(null) diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml index c45dde17cb..319d6ad2f2 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml @@ -69,7 +69,9 @@

@(await Component.InvokeAsync(typeof(ContentFragmentViewComponent), new DefaultContentDto { - ContentFragments = Model.ViewModel.ContentFragments + ContentFragments = Model.ViewModel.ContentFragments, + AllowHtmlTags = true, + PreventXSS = Model.PreventXssFeature.IsEnabled, }))

@if (Model.ViewModel.LastModificationTime != null) @@ -137,19 +139,19 @@ } @if (isScrollIndexEnabled) { -

-
@L["InThisDocument"]
- +
+
@L["InThisDocument"]
+ - }
diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml.cs index a503ff0794..3e174164cf 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/BlogPost.cshtml.cs @@ -29,6 +29,8 @@ public class BlogPostModel : CmsKitPublicPageModelBase public BlogFeatureDto BlogPostScrollIndexFeature { get; private set; } + public BlogFeatureDto PreventXssFeature { get; private set; } + protected IBlogPostPublicAppService BlogPostPublicAppService { get; } protected IBlogFeatureAppService BlogFeatureAppService { get; } @@ -81,6 +83,8 @@ public class BlogPostModel : CmsKitPublicPageModelBase BlogPostScrollIndexFeature = await BlogFeatureAppService.GetOrDefaultAsync(ViewModel.BlogId, GlobalFeatures.BlogPostScrollIndexFeature.Name); } + PreventXssFeature = await BlogFeatureAppService.GetOrDefaultAsync(ViewModel.BlogId, BlogConsts.PreventXssFeatureName); + return Page(); } } diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml index 31fde2da6e..4237eb5c31 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Pages/Index.cshtml @@ -28,7 +28,9 @@ @(await Component.InvokeAsync(typeof(ContentFragmentViewComponent), new DefaultContentDto { - ContentFragments = Model.ViewModel.ContentFragments + ContentFragments = Model.ViewModel.ContentFragments, + PreventXSS = false, + AllowHtmlTags = true, })) From 8dd3c3dc8d0422899abb2577810bc36ea9295734 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Wed, 20 Sep 2023 14:29:55 +0300 Subject: [PATCH 3/4] Pass parameters to MarkdownRenderer --- .../Pages/CmsKit/Components/Contents/ContentFragment.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/ContentFragment.cshtml b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/ContentFragment.cshtml index 3ac2080529..80834dd7fc 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/ContentFragment.cshtml +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/Contents/ContentFragment.cshtml @@ -14,7 +14,7 @@ { if (contentFragment.Type == ContentConsts.Markdown) { - @Html.Raw(await MarkdownRenderer.RenderAsync(contentFragment.GetProperty("Content"))) + @Html.Raw(await MarkdownRenderer.RenderAsync(contentFragment.GetProperty("Content"), Model.ContentDto.AllowHtmlTags, Model.ContentDto.PreventXSS, Model.ContentDto.ReferralLink)) } else if (contentFragment.Type == ContentConsts.Widget) { From 22bceae61cc6f858f98f57e89f63e478f5be2d1b Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Thu, 21 Sep 2023 10:52:04 +0300 Subject: [PATCH 4/4] Disable XSS preventation for content preview --- .../Components/ContentPreview/ContentPreviewViewComponent.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/ContentPreviewViewComponent.cs b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/ContentPreviewViewComponent.cs index 2251f6d0cd..f71f9aeebf 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/ContentPreviewViewComponent.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Common.Web/Pages/CmsKit/Components/ContentPreview/ContentPreviewViewComponent.cs @@ -25,7 +25,9 @@ public class ContentPreviewViewComponent : AbpViewComponent return View("~/Pages/CmsKit/Components/ContentPreview/Default.cshtml", new DefaultContentDto { - ContentFragments = fragments + ContentFragments = fragments, + AllowHtmlTags = true, + PreventXSS = false }); } }