diff options
| author | Uwe.Tews <uwe.tews@localhost> | 2010-01-06 17:31:59 +0000 |
|---|---|---|
| committer | Uwe.Tews <uwe.tews@localhost> | 2010-01-06 17:31:59 +0000 |
| commit | ceb4cb75c77e61379d8224bbd236770e5c50345e (patch) | |
| tree | 9e6d9dfe5337a989ea08583ce862f1021d2e7a78 /libs/sysplugins/smarty_internal_resource_extends.php | |
| parent | 57fd94ddb1979cc5b4ea488513c280b1764f0e7d (diff) | |
| download | smarty-ceb4cb75c77e61379d8224bbd236770e5c50345e.tar.gz smarty-ceb4cb75c77e61379d8224bbd236770e5c50345e.tar.bz2 smarty-ceb4cb75c77e61379d8224bbd236770e5c50345e.zip | |
- bugfix for custom delimiter at extends resource and {extends} tag
Diffstat (limited to 'libs/sysplugins/smarty_internal_resource_extends.php')
| -rw-r--r-- | libs/sysplugins/smarty_internal_resource_extends.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php index 69e93b6b..427254a9 100644 --- a/libs/sysplugins/smarty_internal_resource_extends.php +++ b/libs/sysplugins/smarty_internal_resource_extends.php @@ -115,10 +115,10 @@ class Smarty_Internal_Resource_Extends { } protected function saveBlockData($block_content, $block_tag, $_filepath) { - if (0 == preg_match('/(.?)(name=)([^ ]*)/', $block_tag, $_match)) { + if (0 == preg_match("/(.?)(name=)(.*?)(?=(\s|{$this->smarty->right_delimiter}))/", $block_tag, $_match)) { $this->smarty->trigger_error("\"" . $block_tag . "\" missing name attribute"); } else { - $_name = trim($_match[3], "\"'}"); + $_name = trim($_match[3], "\"'"); if (isset($this->smarty->block_data[$_name])) { if (strpos($this->smarty->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) { $this->smarty->block_data[$_name]['source'] = |
