Tuesday, May 18, 2021

Javascript - Html Striping and Encoding


 Basically letting your browser do the parsing of the html and you then pickup the text content from that parse.

Another reminder.
Creating an element in this case li. And adding the stripped html to the innerText.
You can also send unstripped html directly into a with a.innerHTML





Monday, May 3, 2021

EPiServer - Check app data path from Code

  var appDataBasePath = EPiServer.Framework.Configuration.EPiServerFrameworkSection.Instance.AppData.BasePath;

            if (appDataBasePath.ToLower() == "app_data")
            {
                commentLogger.Log(Level.Error, $@"App data Path used: {AppDomain.CurrentDomain.BaseDirectory}{appDataBasePath}");
            }