javascriptescape.pm

来自「codestriker is a develop useful tool to 」· PM 代码 · 共 23 行

PM
23
字号
package Codestriker::Template::Plugin::JavascriptEscape;# Simple template toolkit plugin module for escaping the appropriate# characters within a javascript string.use Template::Plugin::Filter;use Codestriker;use base qw( Template::Plugin::Filter );sub filter {    my ($self, $text) = @_;    # Escape double and single quotes and backslashes.    $text =~ s/\\/\\\\/g;    $text =~ s/\"/\\\"/g;    $text =~ s/\'/\\\'/g;        return $text;}1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?