decode html

电子邮件

decode html

转义处理

支持 &lt;/& gt; 中间有空格的情况(如 & lt;)。这样即使内容被多次编码或含空格,也能正确恢复成 <img> 标签显示表情。

复制代码
        /**
         * 转义处理
         * 支持 &lt;/& gt; 中间有空格的情况(如 & lt;)。这样即使内容被多次编码或含空格,也能正确恢复成 <img> 标签显示表情。
         * 
         * @author ZengWenFeng
         * @date 2026.01.28
         * @email 117791303@QQ.com
         * @mobile 13805029595
         */
        function decode(value)
        {
            return value
                .replace(/&\s*lt\s*;/gi, '<')
                .replace(/&\s*gt\s*;/gi, '>')
                .replace(/&\s*amp\s*;/gi, '&')
                .replace(/&\s*quot\s*;/gi, '"')
                .replace(/&\s*#39\s*;/gi, "'")
                .replace(/&\s*apos\s*;/gi, "'");
        }

电子邮寄功能

相关推荐
呼噜想睡觉19 小时前
Flex弹性布局
css·html·css3
AI行业学习20 小时前
Claude Code + cc-switch + Git + Node.js 全套下载+安装+配置完整版
开发语言·git·python·前端框架·node.js·html·notepad++
并不喜欢吃鱼1 天前
一.前端web开发:零基础吃透 HTML5 核心知识
前端·html·html5
AI行业学习1 天前
Claude Code + cc-switch + Git + Node.js 一站式完整安装配置教程【8.3】
git·python·安全·前端框架·node.js·html·notepad++
AI行业学习1 天前
Claude Code + cc-switch + Git + Node.js 一站式完整安装配置教程(2026最新·国内可用版)
人工智能·git·python·安全·node.js·html·notepad++
a1117762 天前
小鸡下蛋 小游戏 html
前端·开源·html
DevOpenClub2 天前
用网页快照、静态 HTML 和 PDF 转换接口构建网页归档 Agent
前端·人工智能·pdf·html
瓦学妹2 天前
2026年如何才能在不被屏蔽的情况下抓取网站?
前端·javascript·html
软件技术NINI3 天前
盗墓笔记html+css+js 2页
css·笔记·html
ShuiShenHuoLe3 天前
Go html/template 使用入门
开发语言·golang·html