Skip to content

Commit

Permalink
Fix pop.phtml javascript issue when form parameter includes newline
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimlawal committed Mar 16, 2016
1 parent 21cb22a commit 339e2b7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if($params):
function payWithPaystack(){
var handler = PaystackPop.setup({
<?php foreach ($params as $name => $value): ?>
<?php echo $name; ?>: '<?php echo str_replace("'","\\'",$value); ?>',
<?php echo $name; ?>: '<?php echo str_replace(array("'","\n"),array("\\'"," "),$value); ?>',
<?php endforeach; ?>
ref: '<?php echo $params["orderId"]; ?>' + generateREF(),
callback: function(response){
Expand Down

0 comments on commit 339e2b7

Please sign in to comment.