[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2297] trunk
- Subject: SF.net SVN: ledger-smb:[2297] trunk
- From: ..hidden..
- Date: Thu, 21 Aug 2008 20:21:13 +0000
Revision: 2297
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2297&view=rev
Author: einhverfr
Date: 2008-08-21 20:21:11 +0000 (Thu, 21 Aug 2008)
Log Message:
-----------
Correcting issues retrieving contact info which contain '#' in description or contact info.
Modified Paths:
--------------
trunk/LedgerSMB/Template.pm
trunk/UI/Contact/contact.html
Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm 2008-08-21 20:05:54 UTC (rev 2296)
+++ trunk/LedgerSMB/Template.pm 2008-08-21 20:21:11 UTC (rev 2297)
@@ -256,9 +256,17 @@
$cleanvars->{text} = sub { return $self->{locale}->text(@_)};
}
else {
- $cleanvars->{text} = sub { return shift @_ };
- }
+ $cleanvars->{text} = sub { return shift @_ };
+
+ }
+ $cleanvars->{tt_url} = sub {
+ my $str = shift @_;
+ my $regex = qr/([^a-zA-Z0-9_.-])/;
+ $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge;
+ return $str;
+ };
+
$format->can('process')->($self, $cleanvars);
#return $format->can('postprocess')->($self);
my $post = $format->can('postprocess')->($self);
Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html 2008-08-21 20:05:54 UTC (rev 2296)
+++ trunk/UI/Contact/contact.html 2008-08-21 20:21:11 UTC (rev 2297)
@@ -594,17 +594,19 @@
<td class="contact_class"><?lsmb ct.class ?></td>
<td class="contact"><?lsmb ct.contact ?></td>
<td class="contact_actions">
- <a href="<?lsmb script ?>?entity_id=<?lsmb entity_id
- ?>&contact=<?lsmb ct.contact
- ?>&contact_class=<?lsmb ct.class_id
- ?>&description=<?lsmb ct.description
+ <a href="<?lsmb tt_url(script)
+ ?>?entity_id=<?lsmb tt_url(entity_id)
+ ?>&contact=<?lsmb tt_url(ct.contact)
+ ?>&contact_class=<?lsmb tt_url(ct.class_id)
+ ?>&description=<?lsmb tt_url(ct.description)
?>&action=edit&credit_id=<?lsmb
- credit_id ?>"
+ tt_url(credit_id) ?>"
>[<?lsmb text('Edit'); ?>]</a>
- <a href="<?lsmb script ?>?entity_id=<?lsmb entity_id
- ?>&contact_id=<?lsmb ct.id
+ <a href="<?lsmb tt_url(script)
+ ?>?entity_id=<?lsmb tt_url(entity_id)
+ ?>&contact_id=<?lsmb tt_url(ct.id)
?>&action=delete_contact&credit_id=<?lsmb
- credit_id ?>"
+ tt_url(credit_id) ?>"
>[<?lsmb text('Delete'); ?>]</a>
</td>
</tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.