protected function createTemplate($class = NULL)
 {
     $template = parent::createTemplate($class);
     $texy = new \Texy();
     $texy->encoding = 'utf-8';
     $texy->setOutputMode(\Texy::HTML5);
     // config as in \TexyConfigurator::safeMode($texy);
     $safeTags = array('a' => array('href', 'title'), 'acronym' => array('title'), 'b' => array(), 'br' => array(), 'cite' => array(), 'code' => array(), 'em' => array(), 'i' => array(), 'strong' => array(), 'sub' => array(), 'sup' => array(), 'q' => array(), 'small' => array());
     $texy->allowedClasses = \Texy::NONE;
     // no class or ID are allowed
     $texy->allowedStyles = \Texy::NONE;
     // style modifiers are disabled
     $texy->allowedTags = $safeTags;
     // only some "safe" HTML tags and attributes are allowed
     $texy->urlSchemeFilters[\Texy::FILTER_ANCHOR] = '#https?:|ftp:|mailto:#A';
     $texy->urlSchemeFilters[\Texy::FILTER_IMAGE] = '#https?:#A';
     $texy->allowed['image'] = FALSE;
     // disable images
     $texy->allowed['link/definition'] = FALSE;
     // disable [ref]: URL  reference definitions
     $texy->allowed['html/comment'] = FALSE;
     // disable HTML comments
     $texy->linkModule->forceNoFollow = TRUE;
     // force rel="nofollow"
     $template->registerHelper('texy', callback($texy, 'process'));
     return $template;
 }
 protected function createTemplate($class = NULL)
 {
     $template = parent::createTemplate($class);
     $template->registerHelper('thumbnail', $this->thumbnailGenerator->thumbnail);
     return $template;
 }