view release on metacpan or search on metacpan
lib/App/Mowyw.pm view on Meta::CPAN
$s =~ s/^\s+//g;
$s =~ s/\s+$//g;
return $s;
}
sub escape {
my $str = shift;
my %esc = (
"\\" => '\\\\',
"\t" => '\t',
"\n" => '\n',
lib/App/Mowyw.pm view on Meta::CPAN
my $message = shift;
my @filenames = @{shift()};
my $token = shift;
my $str = "Parse error in file '$filenames[0]': $message\n";
if ($token) {
$str .= "in line $token->[3] near'" . escape($token->[0]) ."'\n";
}
for (@filenames[0..$#filenames]) {
$str .= " ...included from file '$_'\n";
}
confess $str;
lib/App/Mowyw.pm view on Meta::CPAN
my $str = strip_ws(slurp_upto_token($tokens, 'TAG_END', $meta));
my ($name, $rest) = split m/\s+/, $str, 2;
my %options = parse_hash($rest, 'readvar', $meta);
my $c = resolve_var($name, $meta);
if (defined $options{escape} && lc $options{escape} eq 'html'){
return encode_entities($c);
}
return $c if defined $c;
return '';
}
lib/App/Mowyw.pm view on Meta::CPAN
return do_hilight($str, $lang, $meta);
}
sub do_hilight {
my ($str, $lang, $meta) = @_;
if ($lang eq 'escape'){
return encode_entities($str);
}
eval {
no warnings "all";
require Text::VimColor;
view all matches for this distribution
view release on metacpan or search on metacpan
$this->{debug} = $val ? $val : 1;
return $this;
}
# }}}
# set_no_command_escapes_option {{{
sub set_no_command_escapes_option {
my $this = shift;
$this->{no_command_escapes} = shift || 0;
return $this;
}
# }}}
$v = 0 if $t =~ m/(?:no|false)/i;
$this->set_logfile_option($c, $v);
}
if( my $c = $this->{_conf}{options}{'no-command-escapes'} ) {
my $v = ($c ? 1:0);
$v = 0 if $c =~ m/(?:no|false)/i;
$this->set_no_command_escapes_option( $v );
}
return $this;
}
# }}}
for my $h (reverse @hosts[1 .. $#hosts]) {
splice @c, $i+1, 0, @c[0 .. $i-1] => $h;
push @indexes_of_replacements, $i+1 + $indexes_of_replacements[-1];
unless( $this->{no_command_escapes} ) {
for my $arg (@c[$i+1 .. $#c]) {
# NOTE: This escaping is going to be an utter pain to maintain...
$arg =~ s/([`\$])/\\$1/g;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MtAws/Glacier/Inventory/CSV.pm view on Meta::CPAN
sub _parse
{
my ($self) = @_;
# Text::CSV with below options does not seem to work for our case
# ( { binary => 1 , allow_whitespace => 1, quote_char => '"', allow_loose_quotes => 1, escape_char => "\\", auto_diag=>1} )
# because Amazon CSV is buggy https://forums.aws.amazon.com/thread.jspa?threadID=141807&tstart=0
my $re = undef;
my @fields;
my @records;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ChordPro/Config.pm view on Meta::CPAN
$new = $parser->decode($data);
}
# And re-encode it using the schema.
my $res = $parser->encode( data => $new, pretty => 1,
nounicodeescapes => 1, schema => $schema );
# use DDP; p $res;
# Add trailer.
$res .= "\n// End of Config.\n";
# Write if out.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MusicExpo.pm view on Meta::CPAN
$files{$basename} //= [];
push @{$files{$basename}}, thaw scalar $info{$suffix}->($file);
}
my $ht=HTML::Template::Compiled->new(
default_escape => 'HTML',
global_vars => 2,
$template eq '' ? (scalarref => \$default_template) : (filename => $template),
);
my @files;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Muter.pm view on Meta::CPAN
sp => 'Encode space',
space => 'Encode space',
tab => 'Encode tab',
nl => 'Encode newline',
white => 'Encode space, tab, and newline',
cstyle => 'Encode using C-like escape sequences',
octal => 'Encode using octal escape sequences',
glob => 'Encode characters recognized by glob(3) and hash mark',
}
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
public/javascripts/ace.js view on Meta::CPAN
(function(){function o(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]);if(!i.define||!i.define.packaged)t.original=i.define,i.define=t,i.define.packaged=!0;if(!i.require||!i.require.packaged)r.original=i.require,i.require=r,i.require.packaged=!0}var ACE_NAMES...
window.require(["ace/ace"], function(a) {
if (a) {
a.config.init(true);
a.define = window.define;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MysqlUtils.pm view on Meta::CPAN
=item * B<database>* => I<str>
(No description)
=item * B<escape_char> => I<str>
Specify character to escape value in field in input CSV, will be passed to Text::CSV_XS.
Defaults to C<\\> (backslash). Overrides C<--tsv> option.
=item * B<filename>* => I<filename>
lib/App/MysqlUtils.pm view on Meta::CPAN
=item * B<tsv> => I<bool>
Inform that input file is in TSV (tab-separated) format instead of CSV.
Overriden by C<--sep-char>, C<--quote-char>, C<--escape-char> options. If one of
those options is specified, then C<--tsv> will be ignored.
=item * B<username> => I<str>
Will try to get default from C<~/.my.cnf>.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Netdisco/DB/Result/Device.pm view on Meta::CPAN
$schema->resultset('Node')
->search({switch => $old_ip})
->update({switch => $new_ip});
#Â this whole shenanigans exists because I cannot work out how to
#Â pass an escaped SQL placeholder into DBIx::Class/SQL::Abstract
#Â see https://www.mail-archive.com/dbix-class@lists.scsys.co.uk/msg07079.html
$schema->storage->dbh_do(sub {
my ($storage, $dbh, @extra) = @_;
local $dbh->{TraceLevel} = ($ENV{DBIC_TRACE} ? '1|SQL' : $dbh->{TraceLevel});
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/NoPAN.pm view on Meta::CPAN
use File::Temp qw(tempdir);
use HTML::LinkExtor;
use List::Util qw(first);
use LWP::Simple ();
use Scope::Guard;
use URI::Escape qw/uri_unescape/;
# FIXME find and automatically load NoPAN::Installer::*.pm
require App::NoPAN::Installer::Perl;
require App::NoPAN::Installer::Configure;
require App::NoPAN::Installer::Makefile; # should better be the last
lib/App/NoPAN.pm view on Meta::CPAN
$_ !~ m{^(\.{1,2}|)$},
} map {
substr($_, 0, length $url) eq $url ? (substr $_, length $url) : ()
} map {
my ($tag, %attr) = @$_;
$tag eq 'a' && $attr{href} ? (uri_unescape $attr{href}) : ();
} do {
my $lx = HTML::LinkExtor->new(undef, $url);
$lx->parse($body);
$lx->links;
};
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Nopaste/Service/ssh.pm view on Meta::CPAN
use parent 'App::Nopaste::Service';
use File::Temp;
use File::Spec;
use POSIX qw(strftime);
use URI::Escape qw(uri_escape);
use namespace::clean 0.19;
sub run {
my ($self, %args) = @_;
lib/App/Nopaste/Service/ssh.pm view on Meta::CPAN
if defined $mode;
system('scp', '-pq', $filename, "$server:$docroot");
my $file = ( File::Spec->splitpath($filename) )[2];
$file = uri_escape($file);
$file =~ s/%2b/+/gi;
return (1, "$topurl/$file");
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/nostray view on Meta::CPAN
RangeError, Rectangle, ReferenceError, RegExp, ResizeAnimation, Request, RotateAnimation,
SQRT1_2, SQRT2, ScrollBar, ScriptEngine, ScriptEngineBuildVersion,
ScriptEngineMajorVersion, ScriptEngineMinorVersion, Scriptaculous, Scroller,
Slick, Slider, Selector, SharedWorker, String, Style, SyntaxError, Sortable, Sortables,
SortableObserver, Sound, Spinner, System, Swiff, Text, TextArea, Template,
Timer, Tips, Type, TypeError, Toggle, Try, "use strict", unescape, URI, URIError, URL,
VBArray, WSH, WScript, XDomainRequest, Web, Window, XMLDOM, XMLHttpRequest, XMLSerializer,
XPathEvaluator, XPathException, XPathExpression, XPathNamespace, XPathNSResolver, XPathResult,
"\\", a, addEventListener, address, alert, apply, applicationCache, arguments, arity, asi, atob,
b, basic, basicToken, bitwise, block, blur, boolOptions, boss, browser, btoa, c, call, callee,
caller, cases, charAt, charCodeAt, character, clearInterval, clearTimeout,
close, closed, closure, comment, condition, confirm, console, constructor,
content, couch, create, css, curly, d, data, datalist, dd, debug, decodeURI,
decodeURIComponent, defaultStatus, defineClass, deserialize, devel, document,
dojo, dijit, dojox, define, else, emit, encodeURI, encodeURIComponent,
entityify, eqeq, eqeqeq, eqnull, errors, es5, escape, esnext, eval, event, evidence, evil,
ex, exception, exec, exps, expr, exports, FileReader, first, floor, focus,
forin, fragment, frames, from, fromCharCode, fud, funcscope, funct, function, functions,
g, gc, getComputedStyle, getRow, getter, getterToken, GLOBAL, global, globals, globalstrict,
hasOwnProperty, help, history, i, id, identifier, immed, implieds, importPackage, include,
indent, indexOf, init, ins, instanceOf, isAlpha, isApplicationRunning, isArray,
bin/nostray view on Meta::CPAN
passfail : true, // if the scan should stop on first error
plusplus : true, // if increment/decrement should not be allowed
proto : true, // if the `__proto__` property should be allowed
prototypejs : true, // if Prototype and Scriptaculous globals should be
// predefined
regexdash : true, // if unescaped first/last dash (-) inside brackets
// should be tolerated
regexp : true, // if the . should not be allowed in regexp literals
rhino : true, // if the Rhino environment globals should be predefined
undef : true, // if variables should be declared before used
scripturl : true, // if script-targeted URLs should be tolerated
bin/nostray view on Meta::CPAN
dojox : false,
define : false,
"require" : false
},
escapes = {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
bin/nostray view on Meta::CPAN
URIError : false
},
// widely adopted global names that are not part of ECMAScript standard
nonstandard = {
escape : false,
unescape : false
},
standard_member = {
E : true,
LN2 : true,
bin/nostray view on Meta::CPAN
cx = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
// token
tx = /^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jshint|jslint|members?|global)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?(...
// characters in strings that need escapement
nx = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
nxg = /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
// star slash
lx = /\*\/|\/\*/;
bin/nostray view on Meta::CPAN
if (ix.test(this)) {
return this;
}
if (nx.test(this)) {
return '"' + this.replace(nxg, function (a) {
var c = escapes[a];
if (c) {
return c;
}
return '\\u' + ('0000' + a.charCodeAt().toString(16)).slice(-4);
}) + '"';
bin/nostray view on Meta::CPAN
function esc(n) {
var i = parseInt(s.substr(j + 1, n), 16);
j += n;
if (i >= 32 && i <= 126 &&
i !== 34 && i !== 92 && i !== 39) {
warningAt("Unnecessary escapement.", line, character);
}
character += n;
c = String.fromCharCode(i);
}
j = 0;
bin/nostray view on Meta::CPAN
warningAt("Avoid \\x-.", line, character);
}
esc(2);
break;
case '':
// last character is escape character
// always allow new line if escaped, but show
// warning if option is not set
allowNewLine = true;
if (option.multistr) {
if (jsonmode) {
warningAt("Avoid EOL escapement.", line, character);
}
c = '';
character -= 1;
break;
}
warningAt("Bad escapement of EOL. Use option multistr if needed.",
line, character);
break;
default:
warningAt("Bad escapement.", line, character);
}
}
r += c;
character += 1;
j += 1;
bin/nostray view on Meta::CPAN
if (c < ' ') {
warningAt(
"Unexpected control character in regular expression.", line, from + l);
} else if (c === '<') {
warningAt(
"Unexpected escaped character '{a}' in regular expression.", line, from + l, c);
}
l += 1;
break;
case '(':
depth += 1;
bin/nostray view on Meta::CPAN
case '|':
b = false;
break;
case ')':
if (depth === 0) {
warningAt("Unescaped '{a}'.",
line, from + l, ')');
} else {
depth -= 1;
}
break;
bin/nostray view on Meta::CPAN
l += 1;
if (option.regexp) {
warningAt("Insecure '{a}'.",
line, from + l, c);
} else if (s.charAt(l) === ']') {
errorAt("Unescaped '{a}'.",
line, from + l, '^');
}
}
if (c === ']') {
warningAt("Empty class.", line,
bin/nostray view on Meta::CPAN
c = s.charAt(l);
l += 1;
switch (c) {
case '[':
case '^':
warningAt("Unescaped '{a}'.",
line, from + l, c);
if (isInRange) {
isInRange = false;
} else {
isLiteral = true;
bin/nostray view on Meta::CPAN
} else if (s.charAt(l) === ']') {
isInRange = true;
} else {
if (option.regexdash !== (l === 2 || (l === 3 &&
s.charAt(1) === '^'))) {
warningAt("Unescaped '{a}'.",
line, from + l - 1, '-');
}
isLiteral = true;
}
break;
case ']':
if (isInRange && !option.regexdash) {
warningAt("Unescaped '{a}'.",
line, from + l - 1, '-');
}
break klass;
case '\\':
c = s.charAt(l);
if (c < ' ') {
warningAt(
"Unexpected control character in regular expression.", line, from + l);
} else if (c === '<') {
warningAt(
"Unexpected escaped character '{a}' in regular expression.", line, from + l, c);
}
l += 1;
// \w, \s and \d are never part of a character range
if (/[wsd]/i.test(c)) {
if (isInRange) {
warningAt("Unescaped '{a}'.",
line, from + l, '-');
isInRange = false;
}
isLiteral = false;
} else if (isInRange) {
bin/nostray view on Meta::CPAN
} else {
isLiteral = true;
}
break;
case '/':
warningAt("Unescaped '{a}'.",
line, from + l - 1, '/');
if (isInRange) {
isInRange = false;
} else {
bin/nostray view on Meta::CPAN
case '?':
case '{':
case '}':
case '+':
case '*':
warningAt("Unescaped '{a}'.", line,
from + l, c);
}
if (b) {
switch (s.charAt(l)) {
case '?':
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Office/CMS.pm view on Meta::CPAN
This saves the user the effort of going to the Search tab to find a site or design
=item o When clicking on the site map, the Edit Pages fields are updated, but the Edit Content fields are not
=item o Add an option, perhaps, to escape entities when inputting HTML
=item o Adopt DBIx::Connector
=item o Implement user-initiated backup and restore
view all matches for this distribution
view release on metacpan or search on metacpan
data/currency.html view on Meta::CPAN
</script><img border="0" width="1" height="1" src="http://au.yahoo.com/csc-bottom.gif?106692251333358/currency" style="display: none"><script type="text/javascript">
var _rsCI="yahoo-au";
var _rsCG="0";
var _rsIMG = new Image(1,1);
_rsIMG.src = "//secure-au.imrworldwide.com/cgi-bin/m?rnd=" + (new Date()).getTime() + "&ci="
+ _rsCI + "&cg=" + _rsCG + "&si=" + escape(window.location.href) + "&rp=" +
escape(document.referrer) + "&cc=1";
</script><noscript><div><img src="//secure-au.imrworldwide.com/cgi-bin/m?ci=yahoo-au&cg=0&cc=1" alt=""></div></noscript></div></body></html><!--ci100.finance.sp1.yahoo.com-->
<!-- xi101.finance.sp2.yahoo.com uncompressed/chunked Mon Nov 30 19:20:28 PST 2009 -->
<script language=javascript>
if(window.yzq_p==null)document.write("<scr"+"ipt language=javascript src=http://l.yimg.com/d/lib/bc/bcr_2.0.4.js></scr"+"ipt>");
</script><script language=javascript>
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Oozie/Deploy/Template.pm view on Meta::CPAN
}
return @define;
}
sub _xml_escape {
my($self, $input) = @_;
return XML::LibXML::Document
->new('1.0', 'UTF-8')
->createTextNode( $input )
->toString;
lib/App/Oozie/Deploy/Template.pm view on Meta::CPAN
my $flat = Hash::Flatten->new->flatten( $rs );
my $var = [
map {
+{
key => $key_prefix . q{.} . $_,
value => $self->_xml_escape( $flat->{ $_ } ),
}
}
sort { lc $a cmp lc $b }
keys %{ $flat }
];
view all matches for this distribution
view release on metacpan or search on metacpan
script/org2html view on Meta::CPAN
if ($args{browser}) {
require Browser::Open;
require URI::Escape;
my $url = "file:" . URI::Escape::uri_escape($temporgfname);
Browser::Open::open_browser($url);
[200];
} else {
return [200, "OK", File::Slurper::read_text($temporgfname)];
}
script/org2html view on Meta::CPAN
my ($fh, $fpath) = File::Temp::tempfile();
print $fh $res->[2];
close $fh;
my $url = "file:" . URI::Escape::uri_escape($fpath);
Browser::Open::open_browser($url);
return [200];
} else {
return $res;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PAIA/Command.pm view on Meta::CPAN
$self->auto_login_for($command);
my $patron = $self->patron // $self->usage_error("missing patron identifier");
my $url = "$core/".uri_escape($patron);
$url .= "/$command" if $command ne 'patron';
# save PAIA core URL in session
if ( ($self->session->get('core') // '') ne $core ) {
$self->session->set( core => $core );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PDFLibrarian/BibTeX.pm view on Meta::CPAN
my $archiveprefix = $bibentry->get('archiveprefix');
$bibentry->set('howpublished', $archiveprefix);
}
}
# escape special characters
foreach my $bibfield ($bibentry->fieldlist()) {
my $bibfieldvalue = $bibentry->get($bibfield);
if ($bibfield =~ /url$/) {
# encode special URL characters
$bibfieldvalue = uri_decode($bibfieldvalue);
$bibfieldvalue = uri_encode($bibfieldvalue, {encode_reserved => 0, double_encode => 0});
} else {
# escape special TeX characters
$bibfieldvalue =~ s{\\*&}{\\&}g;
}
$bibentry->set($bibfield, $bibfieldvalue);
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/pft-gen-rss view on Meta::CPAN
use utf8;
use v5.16;
use Carp;
use Digest::MD5;
use HTML::Escape qw/escape_html/;
use PFT::Tree;
use POSIX qw/strftime/;
use Encode;
use Encode::Locale;
bin/pft-gen-rss view on Meta::CPAN
$pubDate = do {
my($y, $m, $d) = @{$node->date};
strftime("%a, %d %b %Y %H:%M:%S %z", 0, 0, 0, $d, $m, $y - 1900)
};
my $content = escape_html $node->html(\&node_to_href);
if ($first) {
$first = 0;
say "<lastBuildDate>$pubDate</lastBuildDate>"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PTP/Commands.pm view on Meta::CPAN
sub prepare_re {
my ($re, $modes) = @_;
$re = base_prepare_re($re, $modes);
my $r;
if ($modes->{regex_engine} ne 'perl') {
# Some play to correctly escape whatever special characters might be in the
# regex while preserving its semantics. This relies on the fact that the
# 'Terse' option of Data::Dumper is set in the main program.
# The regex-engine variable has been validated in the Args module.
my $str_re = Dumper($re);
my $engine = 're::engine::'.$modes->{regex_engine};
view all matches for this distribution