Skip to content

Fix typo in DOMParser parseFromString docs#43380

Open
Rohan5commit wants to merge 1 commit intomdn:mainfrom
Rohan5commit:rohan/fix-domparser-input-typo
Open

Fix typo in DOMParser parseFromString docs#43380
Rohan5commit wants to merge 1 commit intomdn:mainfrom
Rohan5commit:rohan/fix-domparser-input-typo

Conversation

@Rohan5commit
Copy link

Description

  • Fixes a punctuation typo in the DOMParser.parseFromString() docs by changing sanitize the, input to sanitize the input.

Motivation

  • Keeps the example explanation readable without changing the meaning of the docs.

Additional details

  • Minor wording-only update in a single file.

Related issues and pull requests

  • N/A

@Rohan5commit Rohan5commit requested a review from a team as a code owner March 9, 2026 09:33
@Rohan5commit Rohan5commit requested review from chrisdavidmills and removed request for a team March 9, 2026 09:33
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Mar 9, 2026
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Thanks for catching this, @Rohan5commit. See my suggestion — I think it is more a case of the comma being in the wrong place.


Next we create a {{domxref("TrustedTypePolicy")}} that defines a {{domxref("TrustedTypePolicy/createHTML", "createHTML()")}} for transforming an input string into {{domxref("TrustedHTML")}} instances.
Commonly, implementations of `createHTML()` use a library such as [DOMPurify](https://github.com/cure53/DOMPurify) to sanitize the, input as shown below:
Commonly, implementations of `createHTML()` use a library such as [DOMPurify](https://github.com/cure53/DOMPurify) to sanitize the input as shown below:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Commonly, implementations of `createHTML()` use a library such as [DOMPurify](https://github.com/cure53/DOMPurify) to sanitize the input as shown below:
Commonly, implementations of `createHTML()` use a library such as [DOMPurify](https://github.com/cure53/DOMPurify) to sanitize the input, as shown below:

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Preview URLs (1 page)

External URLs (1)

URL: /en-US/docs/Web/API/DOMParser/parseFromString
Title: DOMParser: parseFromString() method

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

Labels

Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants