case insentive get_meta_tags()

From: Date: Wed, 02 Dec 1998 20:20:04 +0000
Subject: case insentive get_meta_tags()
Groups: php.dev 
Request: Send a blank email to php-dev+get-2640@lists.php.net to get a copy of this message
get_meta_tags() will only get meta tags if the "name" and "content" elements are in lower case. I forgot to check the cvs before I did this to see if it's been fixed already. If not, here's my hack: *** functions/file.c.old Wed Dec 2 14:35:44 1998 --- functions/file.c Wed Dec 2 15:14:45 1998 *************** *** 273,278 **** --- 273,279 ---- memset(var_name,0,50); /* get the variable name from the name attribute of the meta tag */ tmp=strstr(buf,"name=\""); + tmp=tmp ? tmp : strstr(buf,"NAME=\""); if(tmp) { tmp+=6; end=strstr(tmp,"\""); *************** *** 308,313 **** --- 309,315 ---- /* get the variable value from the content attri bute of the meta tag */ tmp=strstr(buf,"content=\""); + tmp=tmp ? tmp : strstr(buf,"CONTENT=\""); if(tmp) { tmp+=9; end=strstr(tmp,"\""); --- Mark Jeftovic, Chief Technology Officer, easyDNS Technologies Inc. dns, web forwarding, domain regs, etc. -> http://www.easyDNS.com/ obligatory personal home page, pgp key -> http://www.shmOOze.net/~markjr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2640) next »