Index: includes/linodef-filter.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linodef/includes/linodef-filter.inc,v
retrieving revision 1.1.2.12
diff -u -r1.1.2.12 linodef-filter.inc
--- includes/linodef-filter.inc	14 Aug 2009 04:12:54 -0000	1.1.2.12
+++ includes/linodef-filter.inc	31 Oct 2009 00:17:37 -0000
@@ -20,6 +20,13 @@
  */
 function _linodef_filter_process(&$body) {
 
+	// ID with options, possible comment will be substituted.
+	// Using preg_replace_callback() to avoid modificator 'e' (which escapes ',",\ and NULL).
+	// Including backwards compatibility for RC2 option-value syntax without "": (?:=[a-zA-Z]*)*.
+	$body = preg_replace_callback('@\[#([0-9a-zA-Z_]+),((?:[,0-9a-zA-Z]*(?:="[^"\]\r\n]*")*(?:=[a-zA-Z_]*)*)*)[^\]\r\n]*\]@', create_function('$treffer', 'return _linodef_filter_processtag($treffer[1], "$treffer[2]");'), $body);
+	$body = preg_replace_callback('@\[#([0-9a-zA-Z_]+):([0-9a-z_]+),((?:[,0-9a-zA-Z]*(?:="[^"\]\r\n]*")*(?:=[a-zA-Z_]*)*)*)[^\]\r\n]*\]@', create_function('$treffer', 'return _linodef_filter_processtag($treffer[1], "$treffer[3]", $treffer[2]);'), $body);
+	$body = preg_replace_callback('@\[#([0-9a-zA-Z_]+):([0-9a-z_]+):([0-9al]+),((?:[,0-9a-zA-Z]*(?:="[^"\]\r\n]*")*(?:=[a-zA-Z_]*)*)*)[^\]\r\n]*\]@', create_function('$treffer', 'return _linodef_filter_processtag($treffer[1], "$treffer[4]", $treffer[2], $treffer[3]);'), $body);
+
 	// Define Linodef tags
 	$preg = array(
 
@@ -33,14 +40,8 @@
 		"@\[#([0-9a-zA-Z_]+):([0-9a-z_]+):([0-9al]+)\]@e"            => "_linodef_filter_processtag($1, '', $2, $3, FALSE);",
 		"@\[#([0-9a-zA-Z_]+):([0-9a-z_]+):([0-9al]+) [^\]\r\n]+\]@e" => "_linodef_filter_processtag($1, '', $2, $3, FALSE);",
 
-		// ID with options, possible comment will be substituted.
-		// Including backwards compatibility for RC2 option-value syntax without "": (?:=[a-zA-Z]*)*.
-		'@\[#([0-9a-zA-Z_]+),((?:[,0-9a-zA-Z]*(?:="[^"\]\r\n]*")*(?:=[a-zA-Z_]*)*)*)[^\]\r\n]*\]@e'                         => '_linodef_filter_processtag($1, "$2");',
-		'@\[#([0-9a-zA-Z_]+):([0-9a-z_]+),((?:[,0-9a-zA-Z]*(?:="[^"\]\r\n]*")*(?:=[a-zA-Z_]*)*)*)[^\]\r\n]*\]@e'            => '_linodef_filter_processtag($1, "$3", $2);',
-		'@\[#([0-9a-zA-Z_]+):([0-9a-z_]+):([0-9al]+),((?:[,0-9a-zA-Z]*(?:="[^"\]\r\n]*")*(?:=[a-zA-Z_]*)*)*)[^\]\r\n]*\]@e' => '_linodef_filter_processtag($1, "$4", $2, $3);',
-
 		// Inline comment which would not appear for readers, only editors.
-		'@\[# [^\]\r\n]+]@e' => '',
+		'@\[# [^\]\r\n]+]@' => '',
 
 		// Backwards compatibility for RC1/2 syntax.
 		// Link Node ID with user defined text.
Index: linodef.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/linodef/linodef.module,v
retrieving revision 1.1.2.9
diff -u -r1.1.2.9 linodef.module
--- linodef.module	14 Aug 2009 04:12:54 -0000	1.1.2.9
+++ linodef.module	31 Oct 2009 00:13:55 -0000
@@ -418,8 +429,9 @@
  */
 function linodef_tag_option_str2array($option_string) {
 	// Replace , and = inside "".
-	$option_string = preg_replace('@(="[^"]*")@e', 'str_replace(",", "\xf4\x80\x81\x8c", "$1")', $option_string);
-	$option_string = preg_replace('@("[^",]*")@e', 'str_replace("=", "\xf4\x80\x8f\x8d", "$1")', $option_string);
+	// Using preg_replace_callback() to avoid modificator 'e' (which escapes ',",\ and NULL).
+	$option_string = preg_replace_callback('@(="[^"]*")@', create_function('$treffer', 'return str_replace(",", "\xf4\x80\x81\x8c", $treffer[0]);'), $option_string);
+	$option_string = preg_replace_callback('@("[^",]*")@', create_function('$treffer', 'return str_replace("=", "\xf4\x80\x8f\x8d", $treffer[0]);'), $option_string);
 
 	// Create the array.
 	// Several options separated by comma.

