Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators angle brackets should be escaped automatically Post 5197 by Neo on Wednesday 8th of August 2001 05:53:03 PM
Old 08-08-2001
OK. I've turned HTML off in the main forum for dummies. Let's see how that well works and if it does all we need.
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Angle brackets

From the Apache thread in the Adanced forum: Thats because your browser interprets anything within angle brackets to be an HTML tag. You need to quote these brackets if you want them to appear correctly. The proper quotes are: &amp;lt; for < and &amp;gt; for > So, for example, you would have... (1 Reply)
Discussion started by: PxT
1 Replies

2. HP-UX

Multicore from a different angle

Everyone seemed to be a little stumped by the multicore question I asked earlier this week, so I decided I'd try a different angle. Turns out that on a multicore system HP-UX reports every core as a seperate processor. All the usual commands (ioscan, top, etc.) report two processors for every... (7 Replies)
Discussion started by: Midcain
7 Replies

3. Linux

By angle-brackets/"pipe" button doesn't work?

How can I configure it? I have a swedish keyboard with swedish keyboard setting. Everything works perfectly (едц) except that button. What can be wrong? /Richard ++ NOTE: It seems like the computer notices the input but that the button isn't assigned to anything (the keyboard-cursor stops).... (1 Reply)
Discussion started by: riwa
1 Replies

4. Shell Programming and Scripting

Echo escaped \c in SH Shell Any Idea

Hi All, I have got an echo statement with "\c" in it to avoid getting into a newline. Ths script is using #!\bin\sh Any idea what could make it to escape "\c" (4 Replies)
Discussion started by: asami
4 Replies

5. Shell Programming and Scripting

Editing long records with characters that need to be escaped.

Hi all, I'm new in unix scripting and I've a problem with a script... :confused: I need to read a file, add some fields in the records, and write them in another file, but even when I simply read and write the records, the shell interprets some caracters and the result is that the records... (5 Replies)
Discussion started by: Macs_Linux
5 Replies

6. Solaris

Reason why some commands need escaped-characters and other not

Hi, this is my first post and hope to make some contribution soon. I'm still learning the basics of UNIX and Linux and BASH. Thus my need to understand the subject at hand. I don't have a problem with technical detail, so hit me :) I have a script where two commands use the contents of a... (2 Replies)
Discussion started by: doublefrangelic
2 Replies

7. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

8. Shell Programming and Scripting

Regex:search/replace but not for escaped character

Hi Input: - -- --- ---- aa-bb-cc aa--bb--cc aa---bb---cc aa----bb----cc Output: . - -. -- aa.bb.cc (7 Replies)
Discussion started by: chitech
7 Replies

9. UNIX for Dummies Questions & Answers

Using read with escaped variables

Not sure if this is possible, but I'm trying to read in a variable that needs to have its escape backslashes intact. So the person who enters the actual value does not have to type any \ characters. Example: read list X1000\ filecab.txt echo "$list" In this case the \ needs to be... (3 Replies)
Discussion started by: newbie2010
3 Replies
Text::MicroTemplate(3pm)				User Contributed Perl Documentation				  Text::MicroTemplate(3pm)

NAME
Text::MicroTemplate - Micro template engine with Perl5 language SYNOPSIS
use Text::MicroTemplate qw(:all); # compile template, and render $renderer = build_mt('hello, <?= $_[0] ?>'); $html = $renderer->('John')->as_string; # or in one line $html = render_mt('hello, <?= $_[0] ?>', 'John')->as_string; # complex form $mt = Text::MicroTemplate->new( template => 'hello, <?= $query->param('user') ?>', ); $code = $mt->code; $renderer = eval << "..." or die $@; sub { my $query = shift; $code->(); } ... $html = $renderer->(CGI->new)->as_string; DESCRIPTION
Text::MicroTemplate is a standalone, fast, intelligent, extensible template engine with following features. standalone Text::MicroTemplate does not rely on other CPAN modules. fast Based on Mojo::Template, expressions in the template is perl code. intelligent Text::MicroTemplate automatically escapes variables when and only when necessary. extensible Text::MicroTemplate does not provide features like template cache or including other files by itself. However, it is easy to add you own (that suites the most to your application), by wrapping the result of the module (which is a perl expression). The module only provides basic building blocks for a template engine. Refer to Text::MicroTemplate::File for higher-level interface. TEMPLATE SYNTAX
The template language is Perl5 itself! # output the result of expression with automatic escape <?= $expr ?> (tag style) ?= $expr (per-line) # execute perl code (tag style) <? foo() ?> ? foo() # comment (tag style) <?# comment ?> ?# comment # loops <ul> ? for my $item (@list) { <li><?= $item ?></li> ? } </ul> EXPORTABLE FUNCTIONS
build_mt($template) Returns a subref that renders given template. Parameters are equivalent to Text::MicroTemplate->new. # build template renderer at startup time and use it multiple times my $renderer = build_mt('hello, <?= $_[0] ?>!'); sub run { ... my $hello = $renderer->($query->param('user')); ... } render_mt($template, @args) Utility function that combines build_mt and call to the generated template builder. # render $hello = render_mt('hello, <?= $_[0] ?>!', 'John'); # print as HTML print $hello->as_string; # use the result in another template (no double-escapes) $enc = render_mt('<h1><?= $_[0] ?></h1>', $hello); Intertally, the function is equivalent to: build_mt($template)->(@_); encoded_string($str) wraps given string to an object that will not be escaped by the template engine OO-STYLE INTERFACE Text::MicroTemplate provides OO-style interface to handle more complex cases. new($template) new(%args) new(\%args) Constructs template renderer. In the second or third form, parameters below are recognized. template template string (mandatory) escape_func escape function (defaults to Text::MicroTemplate::escape_html), no escape when set to undef package_name package under where the renderer is compiled (defaults to caller package) code() returns perl code that renders the template when evaluated filter(sub filter_func { ... })->(sub { template lines }) filters given template lines ? $_mt->filter(sub { s/Hello/Good bye/g })->(sub { Hello, John! ? }) DEBUG
The "MICRO_TEMPLATE_DEBUG" environment variable helps debugging. The value 1 extends debugging messages, 2 reports compiled Perl code with "warn()", 3 is like 2 but uses "die()". SEE ALSO
Text::MicroTemplate::File Text::MicroTemplate::Extended AUTHOR
Kazuho Oku <kazuhooku gmail.com> Tokuhiro Matsuno <tokuhirom AAJKLFJEF GMAIL COM> The module is based on Mojo::Template by Sebastian Riedel. LICENSE
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-09-06 Text::MicroTemplate(3pm)
All times are GMT -4. The time now is 04:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy