mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
refac tools part 1
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Escape XML special characters in a string
|
||||
* @param {string} text - The text to escape
|
||||
* @returns {string} The escaped text
|
||||
*/
|
||||
function escapeXml(text) {
|
||||
if (!text) return '';
|
||||
return text.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
escapeXml,
|
||||
};
|
||||
Reference in New Issue
Block a user