Skip to content

Commit

Permalink
Merge pull request #417 from mohd-akram/simplify-xml-regex
Browse files Browse the repository at this point in the history
Fix invalid XML regex
  • Loading branch information
derduher authored May 23, 2024
2 parents 420f745 + beacb7a commit dbbdbd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sitemap-xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IndexTagNames } from './sitemap-index-stream';

const invalidXMLUnicodeRegex =
// eslint-disable-next-line no-control-regex
/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u0084\u0086-\u009F\uD800-\uDFFF\uFDD0-\uFDDF\u{1FFFE}-\u{1FFFF}\u{2FFFE}-\u{2FFFF}\u{3FFFE}-\u{3FFFF}\u{4FFFE}-\u{4FFFF}\u{5FFFE}-\u{5FFFF}\u{6FFFE}-\u{6FFFF}\u{7FFFE}-\u{7FFFF}\u{8FFFE}-\u{8FFFF}\u{9FFFE}-\u{9FFFF}\u{AFFFE}-\u{AFFFF}\u{BFFFE}-\u{BFFFF}\u{CFFFE}-\u{CFFFF}\u{DFFFE}-\u{DFFFF}\u{EFFFE}-\u{EFFFF}\u{FFFFE}-\u{FFFFF}\u{10FFFE}-\u{10FFFF}]/gu;
/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u0084\u0086-\u009F\uD800-\uDFFF\p{NChar}]/gu;
const amp = /&/g;
const lt = /</g;
const apos = /'/g;
Expand Down

0 comments on commit dbbdbd9

Please sign in to comment.