Fix handling of extra_query_params in Business::OnlinePayment wrapper.
[interchange.git] / code / UI_Tag / jsqn.coretag
1 # Copyright 2002-2007 Interchange Development Group and others
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.  See the LICENSE file for details.
7
8 # $Id: jsqn.coretag,v 1.7 2007-03-30 23:40:54 pajamian Exp $
9
10 UserTag jsqn hasEndTag
11 UserTag jsqn NoReparse
12 UserTag jsqn PosNumber 0
13 UserTag jsqn Version   $Revision: 1.7 $
14 UserTag jsqn Routine   <<EOR
15 sub {
16         my $text = shift;
17         $text =~ s/^[ \t\r]*\n//;
18         my @lines = split /\r?\n/, $text;
19
20         for(@lines) {
21                 ( $_ !~ /'/ and s/\r/\\r/g, $_ = qq{'$_'} )
22                   or
23                 ( $_ !~ /"/ and s/\r/\\r/g, $_ = qq{"$_"} )
24                   or 
25                 ( s/'/\\'/g,  s/\r/\\r/g, $_ = qq{'$_'} );
26         }
27         @lines = "''" unless @lines;
28         return join (" +\n", @lines);
29 }
30 EOR