Revision: ca8006997ca2
Branch:   default
Author:   Pekka Klärck
Date:     Wed Feb  5 13:42:51 2014 UTC
Log:      report: Fixed handling " in search

Update issue 1634
Fixed handling " (w/o breaking &<>) by letting jQuery templates do escaping in view.
http://code.google.com/p/robotframework/source/detail?r=ca8006997ca2

Modified:
 /src/robot/htmldata/rebot/report.html

=======================================
--- /src/robot/htmldata/rebot/report.html       Wed Feb  5 13:17:55 2014 UTC
+++ /src/robot/htmldata/rebot/report.html       Wed Feb  5 13:42:51 2014 UTC
@@ -252,7 +252,8 @@
 }

 function renderSearchDetails(suite, test, include, exclude) {
-    var tests = searchTests(suite, test, include, exclude);
+    var tests = searchTests(util.escape(suite), util.escape(test),
+                            util.escape(include), util.escape(exclude));
     var passed = calculatePassed(tests);
     var stats = {total: tests.length,
                  pass: passed,
@@ -639,35 +640,35 @@
       <tr>
         <th><label for="search-suite">Suite:</label></th>
         <td>
-          <input id="search-suite" type="text" value="{{html suite}}">
+          <input id="search-suite" type="text" value="${suite}">
         </td>
       </tr>
       <tr>
         <th><label for="search-test">Test:</label></th>
         <td>
-          <input id="search-test" type="text" value="{{html test}}">
+          <input id="search-test" type="text" value="${test}">
         </td>
       </tr>
       <tr>
         <th><label for="search-include">Include:</label></th>
         <td>
-          <input id="search-include" type="text" value="{{html include}}">
+          <input id="search-include" type="text" value="${include}">
         </td>
       </tr>
       <tr>
         <th><label for="search-exclude">Exclude:</label></th>
         <td>
-          <input id="search-exclude" type="text" value="{{html exclude}}">
+          <input id="search-exclude" type="text" value="${exclude}">
         </td>
       </tr>
       <tr>
         <th></th>
         <td>
           <input type="submit" value="Search"
- onclick="searchExecuted(util.escape($('#search-suite').val()), - util.escape($('#search-test').val()), - util.escape($('#search-include').val()), - util.escape($('#search-exclude').val()));
+                 onclick="searchExecuted($('#search-suite').val(),
+                                         $('#search-test').val(),
+                                         $('#search-include').val(),
+                                         $('#search-exclude').val());
                           return false">
           <input type="button" value="Clear"
                  onclick="$('#search-suite').val('');

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to