📄 galleryformattingmodule.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System.Xml;
using CommunityServer.Components;
namespace CommunityServer.Galleries.Components
{
/// <summary>
/// Summary description for GalleryFormattingModule.
/// </summary>
public class GalleryFormattingModule : ICSModule
{
public GalleryFormattingModule()
{
}
public void Init(CSApplication csa, XmlNode node)
{
csa.PreSectionUpdate +=new CSSectionEventHandler(csa_PreSectionUpdate);
}
private void csa_PreSectionUpdate(Section section, CSEventArgs e)
{
if(e.ApplicationType == ApplicationType.Gallery && (e.State == ObjectState.Create || e.State == ObjectState.Update))
{
Gallery g = section as Gallery;
g.Description = HtmlScrubber.Clean(g.Description,true,true);
g.Name = HtmlScrubber.Clean(g.Name,true,true);
//g.News = HtmlScrubber.Clean(g.News,true,true);
g.AboutTitle = HtmlScrubber.Clean(g.AboutTitle,true,true);
g.AboutDescription = HtmlScrubber.Clean(g.AboutDescription,true,true);
// These values are inserted into a HTML tag attrib, so we cannot allow HTML
g.MetaTagDescription = Transforms.StripHtmlXmlTags(g.MetaTagDescription);
g.MetaTagKeywords = Transforms.StripHtmlXmlTags(g.MetaTagKeywords);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -