Description: Fixes a UnicodeError exception
Author: W. Martin Borgert <debacle@debian.org>
Origin: other, http://trac-hacks.org/ticket/11752#comment:2
Bug: http://trac-hacks.org/ticket/11752
Bug-Debian: https://bugs.debian.org/774424
Last-Update: 2015-01-03
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/subcomponents/web_ui.py
+++ b/subcomponents/web_ui.py
@@ -134,9 +134,8 @@
                     stream |= Transformer("//div[@class='field'][1]").after(self._build_renamechildren_field())
         elif req.path_info.startswith('/query'):
             # We need to load our script after the initializeFilters() call done by Trac
-            html = HTML('<script type="text/javascript" charset="utf-8" src="' +
-                        req.href.base +
-                        '/chrome/subcomponents/componentselect.js"></script>')
+            html = tag.script(type='text/javascript', charset='utf-8',
+                              src=req.href.chrome('subcomponents/componentselect.js'))
             stream |= Transformer('//head').append(html)
         return stream
     
