Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

febs

Package Overview
Dependencies
Maintainers
3
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

febs - npm Package Compare versions

Comparing version 0.8.39 to 0.8.40

browser/dist/febs-0.8.40/febs.base.js

18

browser/common/string.js

@@ -117,2 +117,18 @@ 'use strict';

return str.replace(/(^\s*)|(\s*$)/g, "")
}
}
/**
* @desc: 对字符串中的 <>空格"& 标签进行转义为 &lt;, &gt;
* @return: string.
*/
exports.escapeHtml = function(str) {
// 转义.
if (str) {
str = exports.replace(str, '&', '&amp;');
str = exports.replace(str, '<', '&lt;');
str = exports.replace(str, '>', '&gt;');
str = exports.replace(str, ' ', '&nbsp;');
str = exports.replace(str, '"', '&quot;');
}
return str||'';
}

9

browser/libs/string.js

@@ -43,9 +43,2 @@ 'use strict';

*/
exports.escapeHtml = function(str) {
// 转义.
if (str) {
str = string.replace(str, '<', '&lt;');
str = string.replace(str, '>', '&gt;');
}
return str||'';
}
exports.escapeHtml = string.escapeHtml;

@@ -403,3 +403,3 @@ febs 库是一些常用的工具的合集;

/**
* @desc: 对字符串中的 <> 标签进行转义为 &lt;, &gt;
* @desc: 对字符串中的 <>空格"& 标签进行转义为 & lt;, & gt;
* @return: string.

@@ -406,0 +406,0 @@ */

@@ -279,5 +279,5 @@ // Type definitions for febs

function trim(str: string): string;
/**
* @desc: 对字符串中的 <> 标签进行转义为 &lt;, &gt;
* @desc: 对字符串中的 <>空格"& 标签进行转义为 &lt;, &gt;
* @return: string.

@@ -284,0 +284,0 @@ */

@@ -86,3 +86,3 @@ {

"name": "febs",
"version": "0.8.39"
"version": "0.8.40"
}

@@ -380,8 +380,5 @@ febs 库是一些常用的工具的合集;

febs.string.trim(str: string) : string;
```
客户端独有.
```js
/**
* @desc: 对字符串中的 <> 标签进行转义为 &lt;, &gt;
* @desc: 对字符串中的 <>空格"& 标签进行转义为 & lt;, & gt;
* @return: string.

@@ -388,0 +385,0 @@ */

@@ -41,1 +41,3 @@ 'use strict';

exports.trim = string.trim;
exports.escapeHtml = string.escapeHtml;

@@ -294,2 +294,8 @@ // Type definitions for febs

function trim(str: string) : string;
/**
* @desc: 对字符串中的 <>空格 标签进行转义为 &lt;, &gt;
* @return: string.
*/
function escapeHtml(str: string): string;
}

@@ -296,0 +302,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc