febs-browser
Advanced tools
Comparing version 0.7.20 to 0.7.21
@@ -249,2 +249,7 @@ febs 库是一些常用的工具的合集; | ||
febs.string.replace(str, strSrc, strDest) | ||
/** | ||
* @desc: 对字符串中的 <> 标签进行转义为 <, > | ||
* @return: string. | ||
*/ | ||
febs.string.escapeHtml(str); | ||
``` | ||
@@ -251,0 +256,0 @@ |
@@ -36,1 +36,14 @@ 'use strict'; | ||
exports.replace = string.replace; | ||
/** | ||
* @desc: 对字符串中的 <> 标签进行转义为 <, > | ||
* @return: string. | ||
*/ | ||
exports.escapeHtml = function(str) { | ||
// 转义. | ||
if (str) { | ||
str = string.replace(str, '<', '<'); | ||
str = string.replace(str, '>', '>'); | ||
} | ||
return str||''; | ||
} |
@@ -73,3 +73,3 @@ { | ||
"name": "febs-browser", | ||
"version": "0.7.20" | ||
"version": "0.7.21" | ||
} |
@@ -249,2 +249,7 @@ febs 库是一些常用的工具的合集; | ||
febs.string.replace(str, strSrc, strDest) | ||
/** | ||
* @desc: 对字符串中的 <> 标签进行转义为 <, > | ||
* @return: string. | ||
*/ | ||
febs.string.escapeHtml(str); | ||
``` | ||
@@ -251,0 +256,0 @@ |
@@ -181,2 +181,7 @@ // Type definitions for febs | ||
function replace(str: string, strSrc: string, strDest: string): string; | ||
/** | ||
* @desc: 对字符串中的 <> 标签进行转义为 <, > | ||
* @return: string. | ||
*/ | ||
function escapeHtml(str:string): string; | ||
} | ||
@@ -183,0 +188,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1481971
15283
466