Skip to content

Commit d82726a

Browse files
Potential fix for code scanning alert no. 6: Incomplete multi-character sanitization
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent d2b4e0a commit d82726a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/content/PrismCode/prismSetup.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ RendererPrism.languages.sql = {
164164
// one of the diff tokens without any nested tokens
165165
if (PREFIXES && env.type in PREFIXES) {
166166
/** @type {string} */
167-
var content = env.content.replace(HTML_TAG, ''); // remove all HTML tags
167+
var content;
168+
do {
169+
content = env.content;
170+
env.content = env.content.replace(HTML_TAG, ''); // remove all HTML tags
171+
} while (env.content !== content);
168172

169173
/** @type {string} */
170174
var decoded = content.replace(/&lt;/g, '<').replace(/&amp;/g, '&');

0 commit comments

Comments
 (0)