Index: luna/add_success.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/luna/add_success.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- luna/add_success.html       11 May 2005 22:35:47 -0000      1.13
+++ luna/add_success.html       4 Jul 2005 23:12:23 -0000       1.14
@@ -30,7 +30,7 @@
 </div>
 <div class="row clear">
   <label class="name">URL:</label>
-  <div class="value wrappedtext"><%URL%></div>
+  <div class="value wrappedtext"><%escape_html URL%></div>
 </div>
 <div class="row clear">
   <label class="name">Category:</label>
Index: luna/category.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/luna/category.html,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- luna/category.html  11 May 2005 22:35:47 -0000      1.27
+++ luna/category.html  4 Jul 2005 23:12:23 -0000       1.28
@@ -51,7 +51,7 @@
 <h3>Related Categories</h3>
 <ul>
 <%~loop related_loop%>
-  <li><a href="<%URL%>"><%Full_Name%></a></li>
+  <li><a href="<%escape_html URL%>"><%Full_Name%></a></li>
 <%~endloop%>
 </ul>
 <%endif%>
Index: luna/include_common_head.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/luna/include_common_head.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- luna/include_common_head.html       4 Jun 2005 05:28:32 -0000       1.6
+++ luna/include_common_head.html       24 Jun 2005 20:13:32 -0000      1.7
@@ -16,7 +16,7 @@
         return;
     var cookies = document.cookie.split(';');
     for (var i = 0; i < cookies.length; i++) {
-        if (cookies[i].match(/<%config.user_cookie_prefix%>s=[0-9a-f]+/)) {
+        if (cookies[i].match(/^\s*<%config.user_cookie_prefix%>s=[0-9a-f]{32}\s*$/)) {
             loginlink.href = '<%config.db_cgi_url%>/user.cgi?logout=1';
             loginlink.className = 'in';
             loginlink.firstChild.nodeValue = 'Logout';
Index: luna/jump_frame.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/luna/jump_frame.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- luna/jump_frame.html        7 Apr 2005 07:50:05 -0000       1.6
+++ luna/jump_frame.html        4 Jul 2005 23:12:23 -0000       1.7
@@ -22,7 +22,7 @@
       <a href="<%config.db_cgi_url%>/review.cgi?ID=<%ID%>;add_review=1">Review Link</a>
       <a href="<%config.db_cgi_url%>/rate.cgi?ID=<%ID%>">Rate Link</a>
       <%if config.bookmark_enabled%><a href="<%config.db_cgi_url%>/bookmark.cgi?action=link_add;ID=<%ID%>">Bookmark Link</a><%endif%>
-      <a href="<%URL%>">Remove Frame</a>
+      <a href="<%escape_html URL%>">Remove Frame</a>
     </div>
   <%endif%>
   </div>
Index: luna/link.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/luna/link.html,v
retrieving revision 1.12
retrieving revision 1.14
diff -u -r1.12 -r1.14
--- luna/link.html      22 Mar 2005 02:01:36 -0000      1.12
+++ luna/link.html      5 Jul 2005 00:40:02 -0000       1.14
@@ -10,7 +10,7 @@
     <%if isFree%><span class="free-item"><span>free</span></span><%endif%>
   <%~endif%>
   </h4>
-  <%if URL ne 'http://'%><p class="linkurl"><%if isValidated eq 'Yes'%><a href="<%config.db_cgi_url%>/jump.cgi?ID=<%ID%>"><%endif%><%if highlight%><%Links::Tools::highlight($URL, $query)%><%else%><%URL%><%endif%><%if isValidated eq 'Yes'%></a><%endif%></p><%endif%>
+  <%if URL ne 'http://'%><p class="linkurl"><%if isValidated eq 'Yes'%><a href="<%config.db_cgi_url%>/jump.cgi?ID=<%ID%>"><%endif%><%if highlight%><%set equery = escape_html $query%><%set eURL = escape_html $URL%><%Links::Tools::highlight($eURL, $equery)%><%else%><%escape_html URL%><%endif%><%if isValidated eq 'Yes'%></a><%endif%></p><%endif%>

   <p class="linkrating">
   <%~if Votes%>
Index: luna/modify_success.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/luna/modify_success.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- luna/modify_success.html    11 May 2005 22:35:47 -0000      1.12
+++ luna/modify_success.html    4 Jul 2005 23:12:23 -0000       1.13
@@ -34,7 +34,7 @@
 </div>
 <div class="row clear">
   <label class="name">URL:</label>
-  <div class="value wrappedtext"><%URL%></div>
+  <div class="value wrappedtext"><%escape_html URL%></div>
 </div>
 <div class="row clear">
   <label class="name">Category:</label>
Index: luna/search_results.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/luna/search_results.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- luna/search_results.html    11 May 2005 22:35:47 -0000      1.17
+++ luna/search_results.html    5 Jul 2005 00:40:02 -0000       1.18
@@ -27,7 +27,7 @@
 <h2>Search Results</h2>

 <p>
-  Your search<%if query%> for <%if highlight%><%Links::Tools::highlight($query, $query)%><%else%><strong><%query%></strong><%endif%><%endif%> returned <strong><%cat_hits%></strong> categor<%if cat_hits != 1%>ies<%else%>y<%endif%> and <strong><%link_hits%></strong> link<%if link_hits != 1%>s<%endif%>
+  Your search<%if query%> for <%if highlight%><%set equery = escape_html $query%><%Links::Tools::highlight($equery, $equery)%><%else%><strong><%escape_html query%></strong><%endif%><%endif%> returned <strong><%cat_hits%></strong> categor<%if cat_hits != 1%>ies<%else%>y<%endif%> and <strong><%link_hits%></strong> link<%if link_hits != 1%>s<%endif%>
 </p>

 <%if category_results_loop.length~%>
Index: luna/subcategory.html
===================================================================
RCS file: /cvs/gossamer/glinks/cgi/admin/templates/luna/subcategory.html,v
retrieving revision 1.3
retrieving revision 1.5
diff -u -r1.3 -r1.5
--- luna/subcategory.html       13 Apr 2005 02:06:35 -0000      1.3
+++ luna/subcategory.html       4 Jul 2005 23:12:23 -0000       1.5
@@ -1,2 +1,2 @@
-<dt><a href="<%URL%>"><%Name%><%if Related%>@<%endif%></a> (<%Number_of_Links%>)<%if Has_New_Links eq 'Yes'%> <span class="new-item"><span>new</span></span><%endif%><%if Has_Changed_Links eq 'Yes'%> <span class="updated-item"><span>updated</span></span><%endif%></dt>
+<dt><a href="<%escape_html URL%>"><%if RelationName%><%RelationName%><%else%><%Name%><%endif%><%if Related%>@<%endif%></a> (<%Number_of_Links%>)<%if Has_New_Links eq 'Yes'%> <span class="new-item"><span>new</span></span><%endif%><%if Has_Changed_Links eq 'Yes'%> <span class="updated-item"><span>updated</span></span><%endif%></dt>
 <%if Description%><dd><%Description%></dd><%endif%>