File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ protected function _addField($parameter)
158
158
$ data ['value ' ] = $ parameter ->getValue ();
159
159
}
160
160
161
+ if ($ parameter ->getType () == 'text ' && $ data ['value ' ] != '' ) {
162
+ $ data ['value ' ] = $ this ->_widget ->decodeReservedChars ($ data ['value ' ]);
163
+ }
164
+
161
165
//prepare unique id value
162
166
if ($ fieldName == 'unique_id ' && $ data ['value ' ] == '' ) {
163
167
$ data ['value ' ] = hash ('sha256 ' , microtime (1 ));
Original file line number Diff line number Diff line change @@ -477,6 +477,24 @@ private function encodeReservedChars($string)
477
477
);
478
478
}
479
479
480
+ /**
481
+ * @param $string
482
+ * @return array
483
+ */
484
+ public function decodeReservedChars ($ string )
485
+ {
486
+ $ map = [
487
+ '{ ' => urlencode ('{ ' ),
488
+ '} ' => urlencode ('} ' )
489
+ ];
490
+
491
+ return str_replace (
492
+ array_values ($ map ),
493
+ array_keys ($ map ),
494
+ $ string
495
+ );
496
+ }
497
+
480
498
/**
481
499
* @param $widget
482
500
* @param $name
You can’t perform that action at this time.
0 commit comments