]> 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:22:17 +0000 (12:22 +0000)
committerjustdave%bugzilla.org <>
Sat, 15 Jan 2005 12:22:17 +0000 (12:22 +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 94334066d6b7dbb7bbc1333092bcf5083dfe18eb..3a9fed0c7bef9d35fd1bbe623d3c6f0d71fe3e8a 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 a985fccb4b5f6a6aa90732daaf0de1f447e1d14d..a6c5fccea9819d0d7f23b57cceed41c43e2c3a7f 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>