mirror of https://github.com/openresty/openresty
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.2 KiB
C
30 lines
1.2 KiB
C
15 years ago
|
[%- FOREACH comment IN comments -%]
|
||
|
<a name="post-[% comment.post %]:comment-[% comment.id %]" id="post-[% comment.post %]:comment-[% comment.id %]"></a>
|
||
|
<div class="comment" id="comment-95523406">
|
||
|
<div class="comment-content">
|
||
|
[%- IF comment.body %]
|
||
|
[%- comment.body.replace('&', '&')
|
||
|
.replace('<', '<')
|
||
|
.replace('>', '>')
|
||
|
.replace('\n', '<br/>')
|
||
|
.replace(' ', ' ')
|
||
|
.replace('(http://(?:\%[A-Fa-f0-9]{2}|[-A-Za-z./0-9~_])+)', '<a href="$1">$1</a>') %]
|
||
|
[%- END %]
|
||
|
</div>
|
||
|
<p class="comment-footer">
|
||
|
Posted by:
|
||
|
[% IF comment.url %]
|
||
|
[%- url = comment.url %]
|
||
|
[% IF NOT url.match('^\\w+://');
|
||
|
url = 'http://' _ url;
|
||
|
END -%]
|
||
|
<a href="[% url | html %]">[% comment.sender | html %]</a>
|
||
|
[% ELSE %]
|
||
|
[% comment.sender | html %] |
|
||
|
[% END %]
|
||
|
[% comment.created | html %]
|
||
|
</p>
|
||
|
</div>
|
||
|
[%- END %]
|
||
|
|