Summernote字体遭Sanitizer拦截报错,请求技术解决方案
Summernote字体族被Sanitizer拦截问题
问题详情
使用Summernote时,其内置字体族被Sanitizer拦截,报错信息如下:
downloadable font: rejected by sanitizer (font-family: "summernote" style:normal weight:400 stretch:100 src index:2)
错误指向的CSS代码:
@font-face{font-family:"summernote";font-style:normal;font-weight:normal;src:url("./font/summernote.eot?4c7e83314b68cfa6a0d18a8b4690044b");src:url("./font/summernote.eot?4c7e83314b68cfa6a0d18a8b4690044b#iefix") format("embedded-opentype"),url("./font/summernote.woff?4c7e83314b68cfa6a0d18a8b4690044b") format("woff"),url("./font/summernote.ttf?4c7e83314b68cfa6a0d18a8b4690044b") format("truetype")}[class^="note-icon-"]:before,[class*=" note-icon-"]:before
具体错误出现在这段代码的TTF字体URL部分:
url("./font/summernote.ttf?4c7e83314b68cfa6a0d18a8b4690044b")
我找到了一些Font-awesome相关的解决方案,但不确定是否适用于当前Summernote字体族的问题。
我的Summernote调用代码
$('#description').summernote({ toolbar: [], width: null, height: null, minHeight: 150, maxWidth: 400, focus: true, maxTextLength: 5000, disableDragAndDrop: true, popover: { image: [ ['remove', ['removeMedia']], ], });
内容的提问来源于stack exchange,提问作者Mauro H. Delmondes
相关产品推荐
相关产品推荐

