You are here

function smarty_modifier_strip_tags in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/smarty/plugins/modifier.strip_tags.php \smarty_modifier_strip_tags()

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)

Parameters

string:

boolean:

Return value

string

File

includes/moodle/lib/smarty/plugins/modifier.strip_tags.php, line 21

Code

function smarty_modifier_strip_tags($string, $replace_with_space = true) {
  if ($replace_with_space) {
    return preg_replace('!<[^>]*?>!', ' ', $string);
  }
  else {
    return strip_tags($string);
  }
}