function _quiz_is_empty_html in Quiz 7.4
Same name and namespace in other branches
- 8.4 quiz.module \_quiz_is_empty_html()
- 6.4 quiz.module \_quiz_is_empty_html()
- 7.6 quiz.module \_quiz_is_empty_html()
- 7 quiz.module \_quiz_is_empty_html()
- 7.5 quiz.module \_quiz_is_empty_html()
Helper function used when figuring out if a textfield or textarea is empty.
Solves a problem with some wysiwyg editors inserting spaces and tags without content.
Parameters
$html: The html to evaluate
Return value
TRUE if the field is empty(can still be tags there) false otherwise.
1 call to _quiz_is_empty_html()
- quiz_validate in ./
quiz.module - Implements hook_validate().
File
- ./
quiz.module, line 4510 - Quiz Module
Code
function _quiz_is_empty_html($html) {
return drupal_strlen(trim(str_replace(' ', '', strip_tags($html, '<img><object><embed>')))) == 0;
}