Skip to content

Add otpauth to allowed schemes for anchor elements - #26

Open
dberry-trivir wants to merge 945 commits into
ForgeRock:masterfrom
trivir:fix/support-otpauth-protocol
Open

Add otpauth to allowed schemes for anchor elements#26
dberry-trivir wants to merge 945 commits into
ForgeRock:masterfrom
trivir:fix/support-otpauth-protocol

Conversation

@dberry-trivir

Copy link
Copy Markdown

Fixes issue #25

mwong7861-ping and others added 30 commits April 7, 2026 12:25
IAM-10065 Removing the test code

IAM-10065 Switching back to BDropdownText

IAM-10065 Reverting to a working state

IAM-10065 Added padding fix
… captured by the global snapshot-errors.js hook
FROliver and others added 28 commits June 22, 2026 15:53
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
allowVulnerableTags: true, // removes the warning for style tag please use with caution
allowedSchemesByTag: {
...sanitizeHtml.defaults.allowedSchemesByTag,
a: [...sanitizeHtml.defaults.allowedSchemes, 'otpauth'],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is purely a TextOutputCallback use case, we might want to scope it, e.g., in sanitizerConfig.js, we can add

export const textOutputCallbackSanitizerConfig = {
  ...baseSanitizerConfig,
  allowedSchemesByTag: {
    ...baseSanitizerConfig.allowedSchemesByTag,
    a: [...sanitizeHtml.defaults.allowedSchemes, 'otpauth'],
  },
};

And then we can import textOutputCallbackSanitizerConfig and use it directly in the TextOutputCallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.