cvs: smarty /libs/plugins function.html_radios.php

"Monte Ohrt" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmohrt1116612711@cvsserver>
mohrt		Fri May 20 14:11:51 2005 EDT

  Modified files:              
    /smarty/libs/plugins	function.html_radios.php 
  Log:
  fix allowable label id characters
  
  
http://cvs.php.net/diff.php/smarty/libs/plugins/function.html_radios.php?r1=1.27&r2=1.28&ty=u
Index: smarty/libs/plugins/function.html_radios.php
diff -u smarty/libs/plugins/function.html_radios.php:1.27 smarty/libs/plugins/function.html_radios.php:1.28
--- smarty/libs/plugins/function.html_radios.php:1.27	Fri May  6 10:27:19 2005
+++ smarty/libs/plugins/function.html_radios.php	Fri May 20 14:11:50 2005
@@ -131,7 +131,7 @@
     $_output = '';
     if ($labels) {
       if($label_ids) {
-          $_id = smarty_function_escape_special_chars(str_replace(' ', '_', $name . '_' . $value));
+          $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value));
           $_output .= '<label for="' . $_id . '">';
       } else {
           $_output .= '<label>';           

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.