Skip to content
Permalink
Browse files Browse the repository at this point in the history
[ui] fixes
  • Loading branch information
Eugeny committed Jan 15, 2014
1 parent 8155dcb commit 3270fd1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions ajenti/plugins/main/content/js/ajenti.coffee
Expand Up @@ -322,8 +322,12 @@ class window.Control


s: (value) ->
# TODO SANITIZE!
value
('' + value) /* Forces the conversion to string. */
.replace(/&/g, '&') /* This MUST be the 1st replacement. */
.replace(/'/g, ''') /* The 4 other predefined entities, required. */
.replace(/"/g, '"')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')

createDom: () ->
""
Expand Down
3 changes: 2 additions & 1 deletion ajenti/plugins/main/content/js/controls.binding.coffee
Expand Up @@ -6,4 +6,5 @@ class window.Controls.bind__template extends window.Control
setupDom: (dom) ->
super(dom)
if @children.length > 0
@dom = @children[0].dom
@dom = @children[0].dom
@properties = @children[0].properties
2 changes: 1 addition & 1 deletion ajenti/plugins/main/content/js/controls.inputs.coffee
Expand Up @@ -231,7 +231,7 @@ class window.Controls.fileupload extends window.Control
super(dom)
@progress = new window.Controls.progressbar(@ui, {}, [])
$(@dom).find('.pb').append($(@progress.dom))
@input = @dom.find('input')[0]
@input = $(@dom).find('input')[0]
@input.addEventListener 'change', (e) =>
file = @input.files[0]
xhr = new XMLHttpRequest()
Expand Down

0 comments on commit 3270fd1

Please sign in to comment.