mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
HTML entities & and < are not handled correctly
- Instead of using `view.escapeHTML`, just check if todo is blank via RegEx
This commit is contained in:
parent
4fea719100
commit
bfe85ad6a8
1 changed files with 3 additions and 1 deletions
|
|
@ -162,8 +162,10 @@ ready (model) ->
|
|||
type = $(el).attr('data-task-type')
|
||||
list = model.at "_#{type}List"
|
||||
newModel = model.at('_new' + type.charAt(0).toUpperCase() + type.slice(1))
|
||||
text = newModel.get()
|
||||
# Don't add a blank todo
|
||||
return unless text = view.escapeHtml newModel.get()
|
||||
return if /^(\s)*$/.test(text)
|
||||
|
||||
newModel.set ''
|
||||
switch type
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue