0
|
1 <macro name="message_with_signature" requires="node">
|
|
2 <n.node_message_as_html />
|
|
3 <n.if.both condition1="[n.owner.has_signature/]" condition2="[n.owner.is_active/]">
|
|
4 <then>
|
|
5 <div class="signature weak-color">
|
|
6 <n.owner.signature_as_html/>
|
|
7 </div>
|
|
8 </then>
|
|
9 </n.if.both>
|
|
10 </macro>
|
|
11
|
|
12 <macro name="node_message_block" dot_parameter="do" requires="node">
|
|
13 <n.global_set_var name="message_block_node" value="[n.this_node/]" />
|
|
14 <n.do/>
|
|
15 </macro>
|
|
16
|
|
17 <macro name="message_block_node" dot_parameter="do">
|
|
18 <n.get_node node="[n.global_var name='message_block_node'/]" do="[n.do/]" />
|
|
19 </macro>
|
|
20
|
|
21 <macro name="node_message_as_html" requires="node">
|
|
22 <n.node_message_block.message.message_as_html />
|
|
23 </macro>
|
|
24
|
|
25 <macro name="node_message_as_text" requires="node">
|
|
26 <n.node_message_block.message.message_as_text />
|
|
27 </macro>
|
|
28
|
|
29 <macro name="message_quoted" requires="node" unindent="true">
|
|
30 <quote author="[n.owner.name/]">
|
|
31 <n.trim.message.as_quoted_text/>
|
|
32 </quote>
|
|
33 <n.nop/>
|
|
34 </macro>
|
|
35
|
|
36 <macro name="message_as_html" requires="message">
|
|
37 <n.if.either condition1="[n.is_deleted/]" condition2="[n.is_deactivated/]">
|
|
38 <then>
|
|
39 <b><t>CONTENTS DELETED</t></b>
|
|
40 <div class="weak-color"><t>The author has deleted this message.</t></div>
|
|
41 </then>
|
|
42 <else>
|
|
43 <n.set_var. name="output">
|
|
44 <n.as_html_list.process_message_html />
|
|
45 </n.set_var.>
|
|
46 <n.if.is_imported_mail>
|
|
47 <then.set_var. name="output">
|
|
48 <n.remove_unsubscription_link.var name="output" />
|
|
49 </then.set_var.>
|
|
50 </n.if.is_imported_mail>
|
|
51 <n.var name="output" />
|
|
52 </else>
|
|
53 </n.if.either>
|
|
54 </macro>
|
|
55
|
|
56 <macro name="process_message_html" requires="html_list">
|
|
57 <n.process_raw_tags/>
|
|
58 <n.process_cdata_tags/>
|
|
59 <n.process_embed regex="[n.embed_regex/]" />
|
|
60 <n.process_file_tags/>
|
|
61 <n.apply_message_security/>
|
|
62 <n.process_quotes wrote="[t][n.author/] wrote[/t]"/>
|
|
63 <n.process_email/>
|
|
64 <n.set_target_to_top/>
|
|
65 <n.add_nofollow/>
|
|
66 <n.process_smilies/>
|
|
67 </macro>
|
|
68
|
|
69 <macro name="apply_message_security" requires="html_list">
|
|
70 <n.if.is_in_command name="node_message_block">
|
|
71 <then.if.not.message_block_node.has_unrestricted_posting>
|
|
72 <then.message_security/>
|
|
73 </then.if.not.message_block_node.has_unrestricted_posting>
|
|
74 <else.message_security/>
|
|
75 </n.if.is_in_command >
|
|
76 </macro>
|
|
77
|
|
78 <macro name="message_security" requires="html_list">
|
|
79 <n.disable_banned_tags.>
|
|
80 script,
|
|
81 style,
|
|
82 html,
|
|
83 head,
|
|
84 body,
|
|
85 link
|
|
86 </n.disable_banned_tags.>
|
|
87 <n.disable_invalid_urls.>
|
|
88 href,
|
|
89 src,
|
|
90 action
|
|
91 </n.disable_invalid_urls.>
|
|
92 <n.disable_javascript_urls.>
|
|
93 href,
|
|
94 src,
|
|
95 action
|
|
96 </n.disable_javascript_urls.>
|
|
97 <n.disable_on_event/>
|
|
98 <n.disable_scripts/>
|
|
99 <n.disable_style_blocks/>
|
|
100 </macro>
|
|
101
|
|
102 <macro name="message_as_text" requires="message">
|
|
103 <n.as_text_list.process_message_text />
|
|
104 </macro>
|
|
105
|
|
106 <macro name="process_message_text" requires="html_list">
|
|
107 <n.process_quotes_as_text wrote="[t][n.author/] wrote[/t]"/>
|
|
108 <n.process_smilies_as_text/>
|
|
109 <n.process_file_tags/>
|
|
110 <n.process_tag tag="b" do="*" />
|
|
111 <n.process_tag tag="/b" do="*" />
|
|
112 <n.process_tag tag="i" do="/" />
|
|
113 <n.process_tag tag="/i" do="/" />
|
|
114 <n.process_tag tag="u" do="_" />
|
|
115 <n.process_tag tag="/u" do="_" />
|
|
116 <n.process_text text="<" replacement="[n.lt/]" />
|
|
117 <n.process_text text=">" replacement="[n.gt/]" />
|
|
118 </macro>
|
|
119
|
|
120
|
|
121 <macro name="embed_regex">
|
|
122 <n.if.is_in_command name="node_message_block">
|
|
123 <then.if.message_block_node.has_unrestricted_posting>
|
|
124 <then>(?s).*</then>
|
|
125 <else.embed_regex_list/>
|
|
126 </then.if.message_block_node.has_unrestricted_posting>
|
|
127 <else.embed_regex_list/>
|
|
128 </n.if.is_in_command >
|
|
129 </macro>
|
|
130
|
|
131 <macro name="embed_regex_list">
|
|
132 (<n.youtube_object_regex/>)|(<n.youtube_object_regex2/>)|(<n.youtube_iframe_regex/>)|(<n.liveleak_regex/>)|(<n.polldaddy_regex/>)|(<n.vimeo_regex/>)
|
|
133 </macro>
|
|
134
|
|
135 <macro name="youtube_object_regex">
|
|
136 <![CDATA[\s*<object width="\d+" height="\d+"><param name="movie" value="http://www.youtube.com/v/[^"]+"></param><param name="allowFullScreen" value="\w+"></param><param name="allowscriptaccess" value="\w+"></param><embed src="http://www.youtube.com/v/[^"]+" type="application/x-shockwave-flash" allowscriptaccess="\w+" allowfullscreen="\w+" width="\d+" height="\d+"></embed></object>\s*]]>
|
|
137 </macro>
|
|
138
|
|
139 <macro name="youtube_object_regex2">
|
|
140 <![CDATA[\s*<object width="\d+" height="\d+"><param name="movie" value="https?://www.youtube(-nocookie)?.com/v/[^"]+"></param><param name="allowFullScreen" value="\w+"></param><param name="allowscriptaccess" value="\w+"></param><embed src="https?://www.youtube(-nocookie)?.com/v/[^"]+" type="application/x-shockwave-flash" width="\d+" height="\d+"( allowscriptaccess="\w+")?( allowfullscreen="\w+")?></embed></object>\s*]]>
|
|
141 </macro>
|
|
142
|
|
143 <macro name="youtube_iframe_regex">
|
|
144 <![CDATA[\s*<iframe[^>]* src="(https?:)?//www.youtube.com/embed/[^"]+"[^>]*></iframe>\s*]]>
|
|
145 </macro>
|
|
146
|
|
147 <macro name="liveleak_regex">
|
|
148 <![CDATA[\s*<object width="\d+" height="\d+"><param name="movie" value="http://www.liveleak.com/e/\w+"></param><param name="wmode" value="\w+"></param><param name="allowscriptaccess" value="\w+"></param><embed src="http://www.liveleak.com/e/\w+" type="application/x-shockwave-flash" wmode="\w+" allowscriptaccess="\w+" width="\d+" height="\d+"></embed></object>\s*]]>
|
|
149 </macro>
|
|
150
|
|
151 <macro name="polldaddy_regex">
|
|
152 <![CDATA[\s*<embed allowScriptAccess="\w+" saveEmbedTags="\w+" quality="\w+" wmode="\w+" bgcolor="#\w+" name="\w+" salign="\w+" scale="\w+" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="p=\d+" src="http://i.polldaddy.com/poll.swf" width="\d+" height="\d+"></embed>\s*]]>
|
|
153 </macro>
|
|
154
|
|
155 <macro name="vimeo_regex">
|
|
156 <![CDATA[\s*<iframe src="http://player.vimeo.com/video/[^"]+" width="\d+" height="\d+" frameborder="0"( webkitAllowFullScreen)?( mozallowfullscreen)?( allowFullScreen)?></iframe>.*]]>
|
|
157 </macro> |