fix: standardize version parsing and simplify string escaping
This commit is contained in:
1 parent
4e2b6b1200
commit
38a7c3da63
23 files changed
+245
-137
No files matched your search
@@ -300,14 +300,14 @@ function makeMarketFaceElem(element: MessageElement): ProtoElem {
|
||||
|
||||
function escapeXml(value: string): string {
|
||||
return value
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/\t/g, '	')
|
||||
.replace(/\n/g, '
')
|
||||
.replace(/\r/g, '
');
|
||||
.replaceAll('&', '&')
|
||||
.replaceAll('<', '<')
|
||||
.replaceAll('>', '>')
|
||||
.replaceAll('"', '"')
|
||||
.replaceAll("'", ''')
|
||||
.replaceAll('\t', '	')
|
||||
.replaceAll('\n', '
')
|
||||
.replaceAll('\r', '
');
|
||||
}
|
||||
|
||||
function xmlPreviewText(value: string): string {
|
||||
|
||||
Reference in new issue
Block a user