mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
Fixed emojify should exclude parsing svg and catch its exception
This commit is contained in:
parent
ba4a7b13b3
commit
3c2a2a348b
1 changed files with 9 additions and 1 deletions
|
@ -196,7 +196,11 @@ function finishView(view) {
|
|||
$(value).gist(viewAjaxCallback);
|
||||
});
|
||||
//emojify
|
||||
emojify.run(view[0]);
|
||||
try {
|
||||
emojify.run(view[0]);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
//mathjax
|
||||
var mathjaxdivs = view.find('.mathjax.raw').removeClass("raw").toArray();
|
||||
try {
|
||||
|
@ -652,6 +656,10 @@ function highlightRender(code, lang) {
|
|||
}
|
||||
|
||||
emojify.setConfig({
|
||||
blacklist: {
|
||||
elements: ['script', 'textarea', 'a', 'pre', 'code', 'svg'],
|
||||
classes: ['no-emojify']
|
||||
},
|
||||
img_dir: '/vendor/emojify/images',
|
||||
ignore_emoticons: true
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue