Skip to content
Permalink
Browse files

feat: use svg emoji

  • Loading branch information
aviraldg committed Jul 5, 2016
1 parent 4069886 commit 9c0dc7428920fab3fffac9d576b7cffa4388eb98
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/HtmlUtils.js
@@ -21,10 +21,10 @@ var sanitizeHtml = require('sanitize-html');
var highlight = require('highlight.js');
var linkifyMatrix = require('./linkify-matrix');
import escape from 'lodash/escape';
import {unicodeToImage, unicodeRegexp} from 'emojione';
import emojione from 'emojione';
import classNames from 'classnames';

const EMOJI_REGEX = new RegExp(unicodeRegexp+"+", "gi");
const EMOJI_REGEX = new RegExp(emojione.unicodeRegexp+"+", "gi");

var sanitizeHtmlParams = {
allowedTags: [
@@ -209,7 +209,8 @@ module.exports = {
};
}
safeBody = sanitizeHtml(body, sanitizeHtmlParams);
safeBody = unicodeToImage(safeBody);
emojione.imageType = 'svg';
safeBody = emojione.unicodeToImage(safeBody);
}
finally {
delete sanitizeHtmlParams.textFilter;

0 comments on commit 9c0dc74

Please sign in to comment.
You can’t perform that action at this time.