added SECURITY so that new lines doesnt allow code and doesnt break the whole things
This commit is contained in:
parent
ac745fde93
commit
04a6bb5c22
@ -144,16 +144,12 @@ document.getElementById( 'send' ).onclick = function() {
|
|||||||
else{
|
else{
|
||||||
var namm= document.getElementById('name').value;
|
var namm= document.getElementById('name').value;
|
||||||
}
|
}
|
||||||
|
var mess = document.getElementById('message').value.replace(/\r?\n/g, "<br />");
|
||||||
outStr += new Date().getTime() + ' ' + namm + '///' + document.getElementById('message').value + '\n';
|
outStr += new Date().getTime() + ' ' + namm + '///' + mess + '\n';
|
||||||
localStorage.setItem( 'outbox', outStr );
|
localStorage.setItem( 'outbox', outStr );
|
||||||
updateOutboxView();
|
updateOutboxView();
|
||||||
checkOutbox();
|
checkOutbox();
|
||||||
document.getElementById('message').value = '';
|
document.getElementById('message').value = '';
|
||||||
//localStorage.setItem(
|
|
||||||
// new Date().getTime(),
|
|
||||||
// document.getElementById('message').value );
|
|
||||||
//updateList();
|
|
||||||
};
|
};
|
||||||
function checkOutbox() {
|
function checkOutbox() {
|
||||||
var outStr = localStorage.getItem( 'outbox' );
|
var outStr = localStorage.getItem( 'outbox' );
|
||||||
|
Loading…
Reference in New Issue
Block a user