diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2019-02-25 22:48:25 +0100 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2019-02-25 22:48:32 +0100 |
commit | dc7286a0ef8111c0855129911492588ba8a384df (patch) | |
tree | dcc4f9be071a1bf55d1f2638ed63c958e0a42634 /client/components/main | |
parent | 13c2157e36f65be4138a85fae0379e0fe31f02bd (diff) | |
download | wekan-dc7286a0ef8111c0855129911492588ba8a384df.tar.gz wekan-dc7286a0ef8111c0855129911492588ba8a384df.tar.bz2 wekan-dc7286a0ef8111c0855129911492588ba8a384df.zip |
Fix list view issues. Allow creation of boards from templates
Diffstat (limited to 'client/components/main')
-rwxr-xr-x | client/components/main/editor.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/components/main/editor.js b/client/components/main/editor.js index 20ece562..88d8abf0 100755 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -36,7 +36,10 @@ import sanitizeXss from 'xss'; const at = HTML.CharRef({html: '@', str: '@'}); Blaze.Template.registerHelper('mentions', new Template('mentions', function() { const view = this; + let content = Blaze.toHTML(view.templateContentBlock); const currentBoard = Boards.findOne(Session.get('currentBoard')); + if (!currentBoard) + return HTML.Raw(sanitizeXss(content)); const knowedUsers = currentBoard.members.map((member) => { const u = Users.findOne(member.userId); if(u){ @@ -45,7 +48,6 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() { return member; }); const mentionRegex = /\B@([\w.]*)/gi; - let content = Blaze.toHTML(view.templateContentBlock); let currentMention; while ((currentMention = mentionRegex.exec(content)) !== null) { |