mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Create the narrowbar using a Handlebars template
This fixes an XSS hole (#249). (imported from commit 5f70c0bc23e0d992f2d85889e2ba9157f1b73b3a)
This commit is contained in:
@@ -13,7 +13,8 @@ $(function () {
|
||||
}
|
||||
|
||||
// Compile Handlebars templates.
|
||||
$.each(['message', 'subscription', 'userinfo_popover_title', 'userinfo_popover_content'],
|
||||
$.each(['message', 'subscription', 'narrowbar',
|
||||
'userinfo_popover_title', 'userinfo_popover_content'],
|
||||
function (index, name) {
|
||||
templates[name] = Handlebars.compile($('#template_'+name).html());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user