用于HTML的Escape方法 – escape-goat

2020-12-14 08:47:00

Escape a string for use in HTML or the inverse

Install

$ npm install escape-goat复制代码

Usage

const escapeGoat = require('escape-goat');

escapeGoat.escape('?? & ??');
//=> '?? & ??'

escapeGoat.unescape('?? & ??');
//=> '?? & ??'

escapeGoat.escape('Hello World');
//=> 'Hello World'复制代码

API

escapeGoat.escape(input)

Escapes the following characters in the giveninputstring:&<>”‘

escapeGoat.unescape(html)

Unescapes the following HTML entities in the giveninputstring:&amp;&lt;&gt;&quot;&#39;


  • 2019-09-03 23:09:17

    Linux下静态库(.a)和动态库(.so) 的生成与使用以及区别

    静态库在程序编译时会被连接到目标代码中,程序运行时将不再需要该静态库。 动态库在程序编译时并不会被连接到目标代码中,而是在程序运行是才被载入,因此在程序运行时还需要动态库存在。