Skip to content

Commit

Permalink
Version Packages (#600)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Aug 18, 2024
1 parent 62a16f3 commit 3a04b9e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
5 changes: 0 additions & 5 deletions .changeset/nasty-knives-attack.md

This file was deleted.

24 changes: 0 additions & 24 deletions .changeset/tricky-poems-collect.md

This file was deleted.

Binary file not shown.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# markdown-to-jsx

## 7.5.0

### Minor Changes

- 62a16f3: Allow modifying HTML attribute sanitization when `options.sanitizer` is passed by the composer.

By default a lightweight URL sanitizer function is provided to avoid common attack vectors that might be placed into the `href` of an anchor tag, for example. The sanitizer receives the input, the HTML tag being targeted, and the attribute name. The original function is available as a library export called `sanitizer`.

This can be overridden and replaced with a custom sanitizer if desired via `options.sanitizer`:

```jsx
// sanitizer in this situation would receive:
// ('javascript:alert("foo")', 'a', 'href')

;<Markdown options={{ sanitizer: (value, tag, attribute) => value }}>
{`[foo](javascript:alert("foo"))`}
</Markdown>

// or

compiler('[foo](javascript:alert("foo"))', {
sanitizer: (value, tag, attribute) => value,
})
```

### Patch Changes

- 553a175: Replace RuleType enum with an object

## 7.4.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Convert markdown to JSX with ease for React and React-like projects. Super lightweight and highly configurable.",
"homepage": "https://markdown-to-jsx.quantizor.dev",
"license": "MIT",
"version": "7.4.7",
"version": "7.5.0",
"publishConfig": {
"access": "public"
},
Expand Down

0 comments on commit 3a04b9e

Please sign in to comment.