siteserver / cms

SS CMS 基于 .NET Core,能够以最低的成本、最少的人力投入在最短的时间内架设一个功能齐全、性能优异、规模庞大并易于维护的网站平台。
https://sscms.com
GNU Affero General Public License v3.0
3.66k stars 1.21k forks source link

BUG:PreviewController.cs的fileContentBuilder 和contentBuilder错误导致单页模板的标签未解析 #835

Open nhren opened 6 years ago

nhren commented 6 years ago

var contentBuilder = new StringBuilder(TemplateManager.GetTemplateContent(siteInfo, templateInfo));

        if (templateInfo.TemplateType == TemplateType.FileTemplate)           //单页
        {
            var fileContentBuilder = new StringBuilder(TemplateManager.GetTemplateContent(siteInfo, templateInfo));
            Parser.Parse(pageInfo, contextInfo, contentBuilder, visualInfo.FilePath, true);
            return Response(fileContentBuilder.ToString(), siteInfo);
        }

第一句读到ContentBuilder 里了。单页判断又读了一次到fileContentBuilder 里。 Parser.Parse的是contentBuilder,却返回了未做Parse的fileContentBuilder 。。

望修正~~~

starlying commented 6 years ago

好的,我们查一下代码

starlying commented 6 years ago

已修改,感谢反馈