فهرست منبع

优化药品库显示

liuchengsen 1 ماه پیش
والد
کامیت
331bf91db1
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      static/index.html

+ 1 - 1
static/index.html

@@ -172,7 +172,7 @@ function escAttr(s){if(!s)return'';return s.replace(/"/g,'"').replace(/'/g,
 function md2html(h){
   if(!h)return'';h=esc(h);
 // 保留图片标签不转义
-h=h.replace(/&lt;img\s+src=&quot;(.+?)&quot;\s*\/?&gt;/g,'<img src="$1" style="max-width:100%">');
+h=h.replace(/&lt;img\s+src="(.+?)"\s*\/?&gt;/g,'<img src="$1" style="max-width:100%">');
   h=h.replace(/\*\*(.+?)\*\*/g,'<strong>$1</strong>');
   h=h.replace(/⚠️?\s*([^\n<]+)/g,'<span class="warn">$1</span>');
   h=h.replace(/\[([^\]]+)\]\((https?:\/\/[^\s<>)]+)\)/g,'<a href="$2" target="_blank" rel="noopener" class="ext-link">$1</a>');