Class RemoveFileSystemLinksMethod

java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.methods.RemoveFileSystemLinksMethod
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

public class RemoveFileSystemLinksMethod extends Object implements freemarker.template.TemplateMethodModelEx
removes any links from a html snippet that might crash wkhtmltopdf, i.e. relative and absolute file system links

Usage: `${removeFileSystemLinks('insert some html here')}`

  • Field Details

    • MAILTO_PATTERN

      public static final Pattern MAILTO_PATTERN
    • URL_PATTERN

      public static final Pattern URL_PATTERN
  • Constructor Details

    • RemoveFileSystemLinksMethod

      public RemoveFileSystemLinksMethod()
  • Method Details

    • exec

      public Object exec(List list) throws freemarker.template.TemplateModelException
      Specified by:
      exec in interface freemarker.template.TemplateMethodModel
      Specified by:
      exec in interface freemarker.template.TemplateMethodModelEx
      Throws:
      freemarker.template.TemplateModelException