public CustomPageController( ILogger <CustomPageController> logger, IOptions <AppSettings> settings, CustomPageService customPageService) : base(logger, settings) { _customPageService = customPageService; }
public void TestRemoveScriptTagFromHtml() { var html = @"<p>Microsoft</p><p>Rocks!</p><p>Azure <br /><script>console.info('hey');</script><img src=""a.jpg"" /> The best <span>cloud</span>!</p>"; var output = CustomPageService.RemoveScriptTagFromHtml(html); Assert.IsTrue(output == @"<p>Microsoft</p><p>Rocks!</p><p>Azure <br /><img src=""a.jpg"" /> The best <span>cloud</span>!</p>"); }
public IHttpActionResult PostCustomPage(CustomPage customPage) { CustomPageService customPageService = new CustomPageService(); customPageService.UpsertCustomPage(customPage, db); return(CreatedAtRoute("DefaultApi", new { id = customPage.PageId }, customPage)); }
public CustomPageController( ILogger <CustomPageController> logger, IOptions <AppSettings> settings, CustomPageService customPageService, IMoongladeAudit moongladeAudit) : base(logger, settings) { _customPageService = customPageService; _moongladeAudit = moongladeAudit; }
public void TestRemoveWhiteSpaceFromStylesheets() { var css = @"h1 { color: red; }"; var output = CustomPageService.RemoveWhiteSpaceFromStylesheets(css); Assert.IsTrue(output == "h1{color:red}"); }
public IHttpActionResult GetCustomPage(string id) { CustomPageService customPageService = new CustomPageService(); var pages = customPageService.GetAllPagesByClientUrl(id, db); return(Ok(pages)); }
public IHttpActionResult GetPagesByClient(string id, NewClientWebPagesDBEntities db) { CustomPageService customPageService = new CustomPageService(); // var content = webContentService.GetWebContentByPageId(id, db); var pages = customPageService.GetAllPagesByClientUrl(id, db); return(Ok(pages)); }
public BlogGraphController( ILogger <BlogGraphController> logger, TagService tagService, CategoryService categoryService, PostService postService, CustomPageService customPageService) { _logger = logger; _tagService = tagService; _categoryService = categoryService; _postService = postService; _customPageService = customPageService; }