blob: 562a714a53af8110e18e0374cba821d9f5695f8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
--- Schmoo ---
These are not in the context, so they should render as they are here (schmoo).
$foo
\$foo
\\$foo
\#woogie
\\#woogie
\\\#woogie
Now put $foo in the context :
$foo = bar
\$foo =\bar
\\$foo =\\bar
As we increase the number of \'s, we alternate renderings :
bar
$foo
\bar
\$foo
\\bar
--- Pluggable Directives ----
We are doing an #include("test.txt"), starting with 0 '\' preceeding :
--text--
#include("test.txt")
\--text--
\#include("test.txt")
\\--text--
Now, foreach is a PD. Escape the first one, and then not the second so it
renders. The third and fourth examples show the single 'unpleasantry' about this. The \
is only an escape when 'touching' VTL, otherwise, it's just schmoo.
#foreach(
\ first element \ second element \
\ first element \ \ second element \ \
\first element\ \second element\ \
--- Control Structures ----
First should be escaped...
#if(true) hi #end
This isn't. Note then that it has to render the \\ as a \ because it's stuck to the VTL
\ hi \
\ hi
And so forth...
\#if(true) hi \#end
\\ hi \\
And more...
#if(true)
hi
#else
there
#end
\ hi
\
\#if(true)
hi
\#else
there
\#end
\ there
\
\#if(false)
hi
\#elseif(true)
there
\#end
#$foo1
\#$foo1
#${foo1}
\#$${foo1}
#C0C0C0
\#C0C0C0
#C0C0C0
\#$C0C0C0
#\$C0C0C0
$(QUERY_STRING{forumid})
\$(QUERY_STRING{forumid})
\\$(QUERY_STRING{forumid})
\
\\
\\\
\\\\
\\\\\
\\\\\\
\\\\\\\
\\\\\\\\
|