-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly escape HTML when working with content editable elements.
- Loading branch information
Daniel Perez
committed
May 29, 2016
1 parent
66a4a93
commit d68ce2c
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import string from 'ac-util/string'; | ||
|
||
export default { | ||
url: new RegExp('https://workflowy\.com.*', 'i'), | ||
// override setvalue | ||
bind: function (window) { | ||
this.setValue = (value) => { | ||
this.elem.innerHTML = value; | ||
this.elem.innerHTML = string.htmlEscape(value); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
}; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This should fix #16