Ticket #901 (closed defect: fixed)

Opened 20 months ago

Last modified 20 months ago

console html template: wrong div, broken CDATA, escaped URL

Reported by: axel Owned by:
Priority: major Milestone: undecided
Version: 0.8.0 Keywords: console.html template
Cc:

Description

Hi,

attached patch fixes three issues

  • the window.onload script doesn't use the correct div (it references a non-existing div)
  • the URL does not work for me (Twisted 10, client firefox 3.6.3); nor url-encoding it makes it work
  • one of the CDATA sections is broken because it's invalid Javascript and must be commented.

Cheers, Axel.

--- status/web/templates/console.html.org	2010-05-24 17:31:04.000000000 +0200
+++ status/web/templates/console.html	2010-06-18 12:16:46.298816240 +0200
@@ -107,7 +107,8 @@
         </div>
       </td>
       <td width="33%" align="right" class="right_align">
-        <script type="text/javascript"> <![CDATA[
+        <script type="text/javascript">
+// <![CDATA[
           function reload_page() {
             name_value = document.getElementById('namebox').value
             if (document.location.href.lastIndexOf('?') == -1)
@@ -190,7 +191,7 @@
         <tr>    
     {% for b in r.builds[c.name] %}
           <td class='DevStatusBox'>
-            <a href='#' onclick='showBuildBox("{{ b.url|urlencode }}", event); return false;' 
+            <a href='#' onclick='showBuildBox("{{ b.url }}", event); return false;' 
                title='{{ b.title }}' class='DevStatusBox {{ b.color }} {{ b.tag }}' 
                target="_blank"></a>
           </td>
@@ -243,7 +244,7 @@
 <script type="text/javascript">
 // replace 'onload="updateDiv(event);" with this, as iframe doesn't have onload event in xhtml
 window.onload = function() {
-  document.getElementById('myframe').onload = function(event) {
+  document.getElementById('frameBox').onload = function(event) {
     updateDiv(event);
   };
 }; 

Change History

comment:1 Changed 20 months ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

Fix console HTML errors (broken CDATA, wrong div, escaped URL)

This goes a bit beyond Axel's patch, but fixes #901.

Changeset: 04f859315b358852643f1315210828add757fd54

Note: See TracTickets for help on using tickets.