2015-05-20 22:46:16 +02:00
|
|
|
function parseEmoticons( inputStr ){
|
|
|
|
|
|
|
|
var emoticons = [
|
|
|
|
{
|
|
|
|
text: ':)',
|
|
|
|
image: '1.png'
|
|
|
|
},
|
2015-05-21 17:17:31 +02:00
|
|
|
{
|
|
|
|
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'
|
|
|
|
},
|
2015-05-20 22:46:16 +02:00
|
|
|
{
|
|
|
|
text:';)',
|
|
|
|
image: '2.png'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
for ( var i = 0; i < emoticons.length; i++ ){
|
|
|
|
inputStr = inputStr.split(emoticons[i].text).join('<img class="emo" src="/web/emoticons/'+emoticons[i].image+'">');
|
|
|
|
}
|
|
|
|
return inputStr;
|
|
|
|
}
|