added emoji + input sanitization

This commit is contained in:
Roel 2015-05-21 17:17:31 +02:00
parent d5c5ccc4ba
commit ae99ee803f
9 changed files with 26 additions and 2 deletions

View File

@ -5,6 +5,30 @@ function parseEmoticons( inputStr ){
text: ':)',
image: '1.png'
},
{
text: '<iframe',
image: 'iframe-open.png'
},
{
text: '</iframe>',
image: 'iframe-close.png'
},
{
text: '<script',
image: 'script-open.gif'
},
{
text: '</script>',
image: 'script-close.gif'
},
{
text: '<style',
image: 'style-open.png'
},
{
text: '</style>',
image: 'style-close.png'
},
{
text:';)',
image: '2.png'

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -201,7 +201,7 @@ var localStorageArray = [];
var color = getNodeColor( orderStorage[i].node );
contentString += '<li><div class="message-block" style="background-color:'+color+'">'+
'<div class="date-sender">On ' + datereadable +
' <b>' + orderStorage[i].user +'</b> wrote:</div>' +
' <b>' + parseEmoticons(orderStorage[i].user) +'</b> wrote:</div>' +
'<div class="message-text">' + parseEmoticons( orderStorage[i].message ) + '</div>' + //parseEmoticons is found in emoji.js
' <div class="nodehops"><div class="node '+orderStorage[i].node+'">from '+orderStorage[i].alias + '</div>' +
' <div class="hops '+orderStorage[i].hops+'">via '+orderStorage[i].hops+' nodes</div></div></div></li>';

View File

@ -51,7 +51,7 @@ function submitImage(){
if( !namm || namm == "" ){
namm = "anonymous";
}
addOutboxItem( namm, image.outerHTML );
addOutboxItem( parseEmoticons(namm), image.outerHTML );
showOverview();
return false;