added include of kses.php and fixed accidental global variable overwriting