-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
/** | ||
* @file web utils tools.ts | ||
* @description 应用用到的工具函数 | ||
* @author BTMuli<[email protected]> | ||
* @since Alpha v0.2.0 | ||
* @since Beta v0.3.3 | ||
*/ | ||
|
||
// TauriGenshin | ||
import TGConstant from "../constant/TGConstant"; | ||
|
||
/** | ||
* @description 转义正则表达式 | ||
* @since Alpha v0.1.2 | ||
* @since Beta v0.3.3 | ||
* @param {string} data 内容 | ||
* @returns {string} 转义后的内容 | ||
*/ | ||
|
@@ -21,7 +19,8 @@ export function decodeRegExp(data: string): string { | |
res = res.replace(/>/g, ">"); | ||
res = res.replace(/ /g, " "); | ||
res = res.replace(/'/g, "'"); | ||
res = res.replace(/"/g, '"'); | ||
// eslint-disable-next-line @typescript-eslint/quotes | ||
res = res.replace(/"/g, `"`); | ||
res = res.replace(/'/g, "'"); | ||
res = res.replace(/&/g, "&"); | ||
return res; | ||
|