Skip to content

Conversation

@klaasman
Copy link
Contributor

@klaasman klaasman commented Sep 6, 2023

This PR fixes a bug where unordered lists don't get their styles unless styles are present for ordered lists.

This PR fixes  a bug where unordered lists don't get their styles unless styles are present for _ordered lists_.
@lordelogos
Copy link
Contributor

Hi @klaasman,

Thank you for this catch and fix.
Can you add a changeset for this PR? Example here

@lordelogos
Copy link
Contributor

DOMPurify is getting removed from this library

Reasons behind it:

  • Developer Responsibility:
    The primary purpose of this library is to allow developers to create email templates with markdown. Any potential vulnerabilities in the generated HTML content primarily result from the developers' input. Therefore, the need for DOMPurify to sanitize the Markdown output is minimal. Developers can opt to use it separately to ensure their content is safe.

  • Compatibility on the Edge:
    DOMPurify operates within the DOM (Document Object Model), and its behavior can be influenced by the surrounding context. This can lead to edge compatibility issues, especially in scenarios where the library is used in various contexts, such as server-side rendering or non-browser environments.

  • Package Size:
    Including DOMPurify as a dependency in the library unnecessarily increases the package size. Removing it will reduce the overall size of the library, making it more lightweight for users.

If developers wish to sanitize the Markdown output manually using DOMPurify, they can do so by including it in their project separately. This change allows users to have more control over the sanitization process and makes the inclusion of DOMPurify an opt-in choice based on their specific security requirements.

Note: This change does not affect the core functionality of the library in generating HTML content from Markdown, but it removes the automatic use of DOMPurify within the library itself.

@lordelogos lordelogos merged commit d035bde into codeskills-dev:master Sep 17, 2023
@lordelogos lordelogos changed the title Fix: unordered lists styles Fix: ul styles, remove DOMPurify Sep 17, 2023
@klaasman klaasman deleted the patch-1 branch September 19, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants