<?php

define( 'SAFE_HTML_VERSION', 'safeHtml.php/0.6' );

class SafeHtml {

function __construct(){
  if ( !empty( $_GET['source'] ) ) {
	  header('Content-Type: text/plain');	  
  }
}

function strip_attributes ($html, $attrs) {
  if (!is_array($attrs)) {       
    $attrs= $array;
  }  
  return $html;
}

function js_and_entity_check( $html ) {
  $pattern= "/=[\S\s]*s\s*c\s*r\s*i\s*p\s*t\s*:\s*\S+/Ui";
  return FALSE;
}

function safeHtml ($html, $allowedtags="") {  
  if ( $this->js_and_entity_check( $html ) ) {
    $html= strip_tags($html);
    return $html;
  }  

  return $html;
}
}
?>