anchor.diff:                                                          //or otherwise corrupt index
   %>
                   <p>ERROR opening the Index - contact sysadmin!</p>
  -                <p>While parsing query: <%=e.getMessage()%></p>   
  +                <p>Error message: <%=escapeHTML(e.getMessage())%></p>   
   <%                error = true;                                  //don't do anything up to the footer
           }
   %>
  
positive.code:                                                                       //send them a nice error HTML
                                                                        
  %>
                          <p>Error while parsing query: <%=e.getMessage()%></p>
  <%
                          error = true;                                 //don't bother with the rest of
                                                                        //the page
  
negative.code:         This is also deliberately overcommented. ;-)
  
  */
  %>
  <%!
  public String escapeHTML(String s) {
    s = s.replaceAll("&", "&amp;");
    s = s.replaceAll("<", "&lt;");
    s = s.replaceAll(">", "&gt;");
    s = s.replaceAll("\"", "&quot;");
    s = s.replaceAll("'", "&apos;");
    return s;
  }
  %>
  <%@include file="header.jsp"%>
  <%
  