/*
* N.B. HTML entities are listed without the leading '&' and trailing ';'
* https://www.freeformatter.com/html-entities.html
*
* FWIW if we wanted to support the full set, it has 2261 entries:
* https://www.w3.org/TR/html5/entities.json
* though I notice that some of these are duplicates and/or are missing ";"
* eg: "&", "&", "&", and "&" all map to "&"
* We no longer need to include numeric entities here, these are now handled
* by String.fromCodePoint/fromCharCode
*
* Anyway the only ones that are really important to allow are the HTML special
* chars <, >, and &, because these ones can trigger special processing if not
* replaced by the corresponding entity.
*/
var entityToUnicode = {
mu: 'μ',
amp: '&',
lt: '<',
gt: '>',
nbsp: ' ',
times: '×',
plusmn: '±',
deg: '°'
};
我认为它与javascript后端有关,特别是在svg_text_utils.js中的
entityToUnicode
所以我认为
$mu;
是唯一有效的希腊字母(因为它是由entityToUnicode
和一手其他字符一起处理的)从svg_text_utils.js:
相关问题 更多 >
编程相关推荐