]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 276907: Don't linkify javascript: or data: URLs in the URL field on a bug.
authorjustdave%bugzilla.org <>
Sat, 15 Jan 2005 12:24:08 +0000 (12:24 +0000)
committerjustdave%bugzilla.org <>
Sat, 15 Jan 2005 12:24:08 +0000 (12:24 +0000)
Patch by Gervase Markham <gerv@mozilla.org>
r= justdave,vladd, a= justdave

template/en/default/bug/edit.html.tmpl
template/en/default/bug/show-multiple.html.tmpl

index a5e81071e67dc2e46198d874acd4d310b9df0d2a..35344c88dd4c8881a3013b7f0d631a09c1420176 100644 (file)
   <tr>
     <td align="right">
       <b>
-        [% IF bug.bug_file_loc %]
+        [% IF bug.bug_file_loc 
+           AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
           <a href="[% bug.bug_file_loc FILTER html %]"><u>U</u>RL</a>:
         [% ELSE %]
           <u>U</u>RL:
index d9e3ed54650d1fcd10a2d9af32a6510ae9414fd8..bf2a14ede62876a19fa0e7cbc60982343c098742 100644 (file)
     <tr>
       <td colspan="4">
         <b>URL:</b>&nbsp;
-        <a href="[% bug.bug_file_loc FILTER html %]">
-                 [% bug.bug_file_loc FILTER html %]</a>
+        [% IF bug.bug_file_loc 
+           AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
+          <a href="[% bug.bug_file_loc FILTER html %]">
+                   [% bug.bug_file_loc FILTER html %]</a>
+        [% ELSE %]
+          [% bug.bug_file_loc FILTER html %]
+        [% END %]
     </tr>
 
     <tr>