added emoji + input sanitization
This commit is contained in:
parent
d5c5ccc4ba
commit
ae99ee803f
24
web/emoji.js
24
web/emoji.js
@ -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'
|
||||
|
BIN
web/emoticons/iframe-close.png
Normal file
BIN
web/emoticons/iframe-close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
BIN
web/emoticons/iframe-open.png
Normal file
BIN
web/emoticons/iframe-open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
BIN
web/emoticons/script-close.gif
Normal file
BIN
web/emoticons/script-close.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
BIN
web/emoticons/script-open.gif
Normal file
BIN
web/emoticons/script-open.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
web/emoticons/style-close.png
Normal file
BIN
web/emoticons/style-close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
web/emoticons/style-open.png
Normal file
BIN
web/emoticons/style-open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
@ -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>';
|
||||
|
@ -51,7 +51,7 @@ function submitImage(){
|
||||
if( !namm || namm == "" ){
|
||||
namm = "anonymous";
|
||||
}
|
||||
addOutboxItem( namm, image.outerHTML );
|
||||
addOutboxItem( parseEmoticons(namm), image.outerHTML );
|
||||
|
||||
showOverview();
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user