changeset 5994:5dfe741d2b0a

js: workaround to avoid <option> tags inside <script> The naive formencode html parser would sometimes (Python 2.6?) fail with AssertionError: <option> outside of <select>
author Mads Kiilerich <madski@unity3d.com>
date Wed, 29 Jun 2016 16:52:07 +0200
parents e0735ea41d8d
children b2195895bbd7
files kallithea/templates/base/base.html kallithea/templates/pullrequests/pullrequest.html
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/base/base.html	Wed Jun 29 16:52:07 2016 +0200
+++ b/kallithea/templates/base/base.html	Wed Jun 29 16:52:07 2016 +0200
@@ -271,7 +271,7 @@
               });
           } else if (context == 'changelog') {
               if (e.choice.type == 'tag' || e.choice.type == 'book') {
-                  $("#branch_filter").append($('<option/>').val(e.choice.text));
+                  $("#branch_filter").append($('<'+'option/>').val(e.choice.text));
               }
               $("#branch_filter").val(e.choice.text).change();
           } else {
--- a/kallithea/templates/pullrequests/pullrequest.html	Wed Jun 29 16:52:07 2016 +0200
+++ b/kallithea/templates/pullrequests/pullrequest.html	Wed Jun 29 16:52:07 2016 +0200
@@ -134,7 +134,7 @@
                 var length = options.length;
                 for(var j = 0; j < length; j++)
                 {
-                  $optgroup.append($('<option/>').text(options[j][1]).val(options[j][0]));
+                  $optgroup.append($('<'+'option/>').text(options[j][1]).val(options[j][0]));
                 }
                 $other_ref.append($optgroup);
               }