summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-18 20:16:13 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-18 20:16:13 +0000
commit481650b24f8a35e54694ef17e22feee6c42e9169 (patch)
tree20b7a647f8daeca8e694d9c243fbf709618103c2 /LedgerSMB
parenta0fbd781d3cd716891365919a189a3288ad0ebc9 (diff)
Add the ampersand to the HTML escape list for parse_template and fix 1815329.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1787 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Form.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 9c109b76..c26fcc1f 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -1311,11 +1311,11 @@ sub format_string {
my %replace = (
'order' => {
- html => [ '<', '>', '\n', '\r' ],
+ html => [ '<', '>', '\n', '\r', '&' ],
txt => [ '\n', '\r' ],
tex => [
quotemeta('\\'), '&', '\n', '\r',
- '\$', '%', '_', '#',
+ quotemeta('$'), '%', '_', '#',
quotemeta('^'), '{', '}', '<',
'>', '£'
]
@@ -1323,13 +1323,14 @@ sub format_string {
html => {
'<' => '&lt;',
'>' => '&gt;',
+ '&' => '&amp;',
'\n' => '<br />',
'\r' => '<br />'
},
txt => { '\n' => "\n", '\r' => "\r" },
tex => {
'&' => '\&',
- '$' => '\$',
+ quotemeta('$') => '\$',
'%' => '\%',
'_' => '\_',
'#' => '\#',