You are here

function minifyhtml_remove_html_comment in Minify Source HTML 7

Helper function to remove HTML comments.

Comments containing IE conditionals will be ignored.

Parameters

array $matches: Matches from initial preg_replace().

Return value

string String with removed HTML comments.

File

./minifyhtml.module, line 361
Hook and helper functions for the Minify HTML module.

Code

function minifyhtml_remove_html_comment(array $matches) {
  return 0 === strpos($matches[1], '[') || FALSE !== strpos($matches[1], '<![') ? $matches[0] : '';
}