X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0cdbf7b07d96646d76def6a39df7ddf0b4c978eb..8817f25b3b69622f98edfc74393ae8d88f827b7a:/SL/Presenter.pm diff --git a/SL/Presenter.pm b/SL/Presenter.pm index f328cce9e..36acc73dd 100644 --- a/SL/Presenter.pm +++ b/SL/Presenter.pm @@ -124,6 +124,16 @@ sub escaped_text { return SL::Presenter::EscapedText->new(text => $text, is_escaped => 1); } +sub escape_js { + my ($self, $text) = @_; + + $text =~ s|\\|\\\\|g; + $text =~ s|\"|\\\"|g; + $text =~ s|\n|\\n|g; + + return SL::Presenter::EscapedText->new(text => $text, is_escaped => 1); +} + 1; __END__ @@ -290,6 +300,16 @@ It is safe to call C on an instance of L. This is a no-op (the same instance will be returned). +=item C + +Returns a JavaScript-escaped version of C<$text>. Instead of a string +an instance of the thin proxy-object L is +returned. + +It is safe to call C on an instance of +L. This is a no-op (the same instance will +be returned). + =item C Returns the global instance of L