We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9421fae commit 4a012c2Copy full SHA for 4a012c2
src/build/mdn-comments.ts
@@ -61,8 +61,9 @@ function insertComment(
61
}
62
63
function generateComment(summary: string, name: string): string | undefined {
64
- // Escape special regex characters in the name
65
- if (["."].some((c) => name.includes(c))) {
+ // Ban any non-alphanumeric characters in the name for safe regex
+ // For now the only known exception is `RTCStatsReport/Symbol.iterator`.
66
+ if (name.match(/\W/)) {
67
return;
68
69
0 commit comments