mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -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);
|
$(value).gist(viewAjaxCallback);
|
||||||
});
|
});
|
||||||
//emojify
|
//emojify
|
||||||
emojify.run(view[0]);
|
try {
|
||||||
|
emojify.run(view[0]);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
//mathjax
|
//mathjax
|
||||||
var mathjaxdivs = view.find('.mathjax.raw').removeClass("raw").toArray();
|
var mathjaxdivs = view.find('.mathjax.raw').removeClass("raw").toArray();
|
||||||
try {
|
try {
|
||||||
|
@ -652,6 +656,10 @@ function highlightRender(code, lang) {
|
||||||
}
|
}
|
||||||
|
|
||||||
emojify.setConfig({
|
emojify.setConfig({
|
||||||
|
blacklist: {
|
||||||
|
elements: ['script', 'textarea', 'a', 'pre', 'code', 'svg'],
|
||||||
|
classes: ['no-emojify']
|
||||||
|
},
|
||||||
img_dir: '/vendor/emojify/images',
|
img_dir: '/vendor/emojify/images',
|
||||||
ignore_emoticons: true
|
ignore_emoticons: true
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue