You are here

modifier.strip_tags.php in Quiz 6.5

Same filename and directory in other branches
  1. 6.6 includes/moodle/lib/smarty/plugins/modifier.strip_tags.php

File

includes/moodle/lib/smarty/plugins/modifier.strip_tags.php
View source
<?php

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * Smarty strip_tags modifier plugin
 *
 * Type:     modifier<br>
 * Name:     strip_tags<br>
 * Purpose:  strip html tags from text
 * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php
 *          strip_tags (Smarty online manual)
 * @param string
 * @param boolean
 * @return string
 */
function smarty_modifier_strip_tags($string, $replace_with_space = true) {
  if ($replace_with_space) {
    return preg_replace('!<[^>]*?>!', ' ', $string);
  }
  else {
    return strip_tags($string);
  }
}

/* vim: set expandtab: */

Functions

Namesort descending Description
smarty_modifier_strip_tags Smarty strip_tags modifier plugin