让简介内可以打空格

This commit is contained in:
枫谷剑仙 2020-12-21 15:55:04 +08:00
parent b766b94ee7
commit cd168278e9
1 changed files with 1 additions and 0 deletions

View File

@ -525,6 +525,7 @@ function cardN(id){
function descriptionToHTML(str)
{
str = str.replace(/\n/ig,"<br>"); //换行
str = str.replace(/ /ig,"&nbsp;"); //换行
str = str.replace(/\^([a-fA-F0-9]+?)\^([^\^]+?)\^p/igm,'<span style="color:#$1;">$2</span>'); //文字颜色
str = str.replace(/\%\{m([0-9]{1,4})\}/g,function (str, p1, offset, s){return cardN(parseInt(p1,10)).outerHTML;}); //怪物头像
return str;