#1183: FormPopulationFilter raises warning at line 215
-------------------------------+--------------------------------------------
 Reporter:  mug...@…           |       Owner:  david   
     Type:  defect             |      Status:  assigned
 Priority:  normal             |   Milestone:  1.0.2   
Component:  filter             |     Version:  1.0.1   
 Severity:  normal             |    Keywords:          
Has_patch:  0                  |  
-------------------------------+--------------------------------------------

Comment(by david):

 Can you try this line as a replacement:
 {{{
 
if(preg_match('/;\s*charset=(")?(?P<charset>.+?(?(1)(?=(?<!\\\\)")|($|(?=[;\s]))))(?(1)")/i',
 $meta->getAttribute('content'), $matches)) {
 }}}
 and tell me if it works for you?

 P.S: this also fixes a bug where the regex only ever matched strings like
 {{{text/html; charset="UTF-8"}}} but never {{{text/html; charset=UTF-8}}},
 i.e. without quotation marks.
 P.P.S: it never goes into this branch for me, by the way; it seems that my
 newer libxml detects a charset from an HTML document even in XML parsing
 mode by looking at a {{{<meta http-equiv="Content-Type"}}} header - what
 is your libxml version?

-- 
Ticket URL: <http://trac.agavi.org/ticket/1183#comment:9>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5



_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to