Changeset 5172ac9 in github


Ignore:
Timestamp:
Sep 21, 2011 8:16:01 AM (20 months ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
Children:
5f71297
Parents:
7f03884
Message:

Aread alter forms in rcube_template::parse() instead of write()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_template.php

    r497013f r5172ac9  
    354354        $this->add_script($js, 'head_top'); 
    355355 
    356         // make sure all <form> tags have a valid request token 
    357         $template = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $template); 
    358         $this->footer = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $this->footer); 
    359          
    360356        // send clickjacking protection headers 
    361357        $iframe = $this->framed || !empty($_REQUEST['_framed']); 
     
    437433 
    438434        $output = $this->parse_with_globals($hook['content']); 
     435 
     436        // make sure all <form> tags have a valid request token 
     437        $output = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $output); 
     438        $this->footer = preg_replace_callback('/<form\s+([^>]+)>/Ui', array($this, 'alter_form_tag'), $this->footer); 
    439439 
    440440        if ($write) { 
Note: See TracChangeset for help on using the changeset viewer.