Add a new package: safe-html-react-parser#199
Conversation
✅ Changeset detectedLatest commit: 80a2486
If no version change is needed, please add The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
|
NPM Packages📦 @naverpay/safe-html-react-parserTotal Sizes: 1.58 kB Total Changes: +1.58 kB 🆕
🧩 Dependency Changes
powered by: naverpay size-action |
|
/canary-publish |
| * @returns Parsed React elements | ||
| */ | ||
| export function safeParse(htmlString: string, options: SafeParseOptions = {}) { | ||
| const {sanitizeConfig = DEFAULT_SANITIZE_CONFIG, preserveCustomTags, ...parserOptions} = options |
There was a problem hiding this comment.
If I customize ALLOWED_TAGS externally, it doesn’t merge with the defaults — it completely overrides them, right?
There was a problem hiding this comment.
I thought merging might be better, but it makes sense to keep it this way since someone might want to remove certain tags. The default config is exported anyway, so developers can merge it however they want.
There was a problem hiding this comment.
Yes, so I exported the DEFAULT_SANITIZE_CONFIG . You can use it when you need an extension of the default value.
Published Canary Packages |
| "devDependencies": { | ||
| "@types/react": "0.14 || 15 || 16 || 17 || 18 || 19", | ||
| "react": "0.14 || 15 || 16 || 17 || 18 || 19" | ||
| }, | ||
| "peerDependencies": { | ||
| "@types/react": "0.14 || 15 || 16 || 17 || 18 || 19", | ||
| "react": "0.14 || 15 || 16 || 17 || 18 || 19" | ||
| }, |
There was a problem hiding this comment.
I followed the peerDeps of html-react-parser.
|
I’ve set up the Nexus registry initialization in Forge. |
2950b18
|
/rc-publish |
Published Canary Packages |
|
/rc-publish |
Published Canary Packages |
|
LOL |


Related Issue
Describe your changes
Request