summaryrefslogtreecommitdiffstats
path: root/template/en/default/attachment/edit.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/attachment/edit.html.tmpl')
-rw-r--r--template/en/default/attachment/edit.html.tmpl5
1 files changed, 1 insertions, 4 deletions
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index 56d2b8a80..eeebcffae 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -185,10 +185,7 @@
defaultcontent = (attachment.contenttype.match('^text\/')) ?
attachment.data.replace('(.*\n|.+)', '>$1') : undef
%]
- [%# The regexp is stolen from quoteUrls(), see Template.pm %]
- [% safe_protocols = constants.SAFE_PROTOCOLS.join('|') %]
- [% IF attachment.contenttype == 'text/plain'
- && attachment.data.match("^($safe_protocols):" _ '[^\s<>\"]+[\w\/]$') %]
+ [% IF attachment.contenttype == 'text/plain' AND is_safe_url(attachment.data) %]
<p>
<a href="[% attachment.data FILTER html %]">
[% IF attachment.datasize < 120 %]