diff --git a/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts b/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts index b24a2cf73f0..afd89eb228d 100644 --- a/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts +++ b/packages/roosterjs-editor-plugins/lib/plugins/Paste/sanitizeLinks/sanitizeLinks.ts @@ -10,13 +10,11 @@ const HTTPS = 'https:'; * @param sanitizingOption the sanitizingOption of BeforePasteEvent * */ export default function sanitizeLinks(sanitizingOption: Required) { - ['href'].forEach(property => { - chainSanitizerCallback( - sanitizingOption.attributeCallbacks, - property, - (value: string, element: HTMLElement) => validateLink(value, element) - ); - }); + chainSanitizerCallback( + sanitizingOption.attributeCallbacks, + 'href', + (value: string, element: HTMLElement) => validateLink(value, element) + ); } function validateLink(link: string, htmlElement: HTMLElement) {