javascript: Fix spelling error in documentation

Corrects the spelling of "occurrences" in the Incomplete Multi-Character
Sanitization documentation to improve clarity.
This commit is contained in:
Ian Lynagh
2025-09-15 14:53:03 +01:00
parent a773042c5d
commit d0091e1b3c

View File

@@ -108,7 +108,7 @@ str.replace(/\.\.\//g, "");
</sample>
<p>
The regular expression attempts to strip out all occurences of <code>/../</code> from <code>str</code>.
The regular expression attempts to strip out all occurrences of <code>/../</code> from <code>str</code>.
This will not work as expected: for the string <code>/./.././</code>, for example, it will remove the single
occurrence of <code>/../</code> in the middle, but the remainder of the string then becomes
<code>/../</code>, which is another instance of the substring we were trying to remove.