[Jifty-commit] r1621 - jifty/trunk/lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Jul 19 17:07:58 EDT 2006
Author: nelhage
Date: Wed Jul 19 17:07:58 2006
New Revision: 1621
Modified:
jifty/trunk/lib/Jifty/Web/Form/Field.pm
Log:
Support multi-line placeholders
Modified: jifty/trunk/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Field.pm Wed Jul 19 17:07:58 2006
@@ -518,7 +518,10 @@
my $self = shift;
return unless $self->placeholder;
my $placeholder = $self->placeholder;
- $placeholder =~ s{(['\\])}{(\\$1)}g;
+ $placeholder =~ s{(['\\])}{\\$1}g;
+ $placeholder =~ s{\n}{\\n}g;
+ $placeholder =~ s{\r}{\\r}g;
+ warn "placeholder: $placeholder";
Jifty->web->out(
qq!<script type="text/javascript">
new Jifty.Placeholder('@{[$self->element_id]}', '$placeholder');
More information about the Jifty-commit
mailing list