_openid_meta_httpequiv

6 openid.inc _openid_meta_httpequiv($equiv, $html)
7 openid.inc _openid_meta_httpequiv($equiv, $html)
8 openid.inc _openid_meta_httpequiv($html)

Pull the http-equiv attribute out of an html meta element

1 call to _openid_meta_httpequiv()

File

modules/openid/openid.inc, line 210
OpenID utility functions.

Code

function _openid_meta_httpequiv($equiv, $html) {
  preg_match('|<meta\s+http-equiv=["\']' . $equiv . '["\'](.*)/?>|iUs', $html, $matches);
  if (isset($matches[1])) {
    preg_match('|content=["\']([^"]+)["\']|iUs', $matches[1], $content);
    if (isset($content[1])) {
      return $content[1];
    }
  }
  return FALSE;
}
Login or register to post comments