用于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;


  • 2018-01-17 01:55:49

    Android设置控件不可点击

    学会安卓控件的不可点击,再加上控件的透明度,估计你会做出不错的效果来。