コード例 #1
0
 /**
  * Returns valid, "safe" HTML.
  *
  * This implementation uses HTMLPurifier {@link http://htmlpurifier.org}.
  *
  * @param  $context A descriptive name of the parameter that you are
  *         validating (e.g. ProfilePage_Sig). This value is used by any
  *         logging or error handling that is done with respect to the value
  *         passed in.
  * @param  $input The actual user input data to validate.
  *
  * @return valid, "safe" HTML.
  */
 public function getSanitizedHTML($context, $input)
 {
     $hvr = new HTMLValidationRule('HTML_Validator', $this->encoder);
     return $hvr->sanitize($context, $input);
 }