WILDAN_IZZUDIN

SOURCE MINIFIER

Nov 7th, 2018
189
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. function sanitize_output($buffer) {
  3.     $search = array(
  4.         '/\>[^\S ]+/s',
  5.         '/[^\S ]+\</s',
  6.         '/(\s)+/s',
  7.         '/<!--(.|\s)*?-->/'
  8.     );
  9.     $replace = array(
  10.         '>',
  11.         '<',
  12.         '\\1',
  13.         ''
  14.     );
  15.     $buffer = preg_replace($search, $replace, $buffer);
  16.     return $buffer;
  17. }
  18. ob_start("sanitize_output");
  19. header("Content-Type: text/html; charset=utf-8");
  20. ?>
RAW Paste Data