Browse Source

Internal: fixed regression introduced in iTop 2.3.0 beta: no error though a mandatory attribute of type HTML has been left empty

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4226 a333f486-631f-4898-b8df-5754b55c2be0
romainq 9 years ago
parent
commit
6efed183d0
1 changed files with 4 additions and 1 deletions
  1. 4 1
      core/attributedef.class.inc.php

+ 4 - 1
core/attributedef.class.inc.php

@@ -2499,7 +2499,10 @@ class AttributeText extends AttributeString
 		switch ($this->GetFormat())
 		{
 			case 'html':
-			$sValue = HTMLSanitizer::Sanitize($sValue);
+			if (($sValue !== null) && ($sValue !== ''))
+			{
+				$sValue = HTMLSanitizer::Sanitize($sValue);
+			}
 			break;
 			
 			case 'text':