From a55ce3778d957d58bd8ea97f97294ac4b77d01d1 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Wed, 31 Oct 2012 11:25:57 +0100 Subject: [PATCH] Match all input element properties and properly deal with type attributes --- class.templater.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/class.templater.php b/class.templater.php index b78b4b9..821eee7 100644 --- a/class.templater.php +++ b/class.templater.php @@ -884,7 +884,7 @@ class TemplateInput extends TemplateStandaloneElement $argument_list = implode(" ", $this->tokens); - if(preg_match_all('/([a-z]+)="([^"]+)"/', $argument_list, $matches, PREG_SET_ORDER)) + if(preg_match_all('/([a-zA-Z0-9-]+)="([^"]+)"/', $argument_list, $matches, PREG_SET_ORDER)) { foreach($matches as $argument) { @@ -902,6 +902,9 @@ class TemplateInput extends TemplateStandaloneElement case "name": $name = $argument[2]; break; + case "type": + $type = $argument[2]; + break; default: $additional_list[$argument[1]] = $argument[2]; }