mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-19 11:02:58 +00:00
Sanitize input to prevent XSS
This commit is contained in:
parent
11814aae88
commit
dc7ca8b7e7
@ -191,7 +191,7 @@ $(function() {
|
||||
|
||||
// Prevents input from having injected markup
|
||||
function cleanInput (input) {
|
||||
var message = $('<div/>').text(input).text();
|
||||
var message = $('<div/>').html(input).text();
|
||||
message = Autolinker.link(message);
|
||||
return message;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user