Skip to content

Commit

Permalink
Fixing markdown allowed attributes (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
cohitre committed Jun 3, 2024
1 parent bcb1daf commit 512dd37
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 24 deletions.
4 changes: 2 additions & 2 deletions packages/block-text/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/block-text/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@usewaypoint/block-text",
"version": "0.0.5",
"version": "0.0.6",
"description": "@usewaypoint/document compatible Text component",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
5 changes: 4 additions & 1 deletion packages/block-text/src/EmailMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ function sanitizer(html: string): string {
}, {}),
img: ['src', 'srcset', 'alt', 'width', 'height', ...GENERIC_ALLOWED_ATTRIBUTES],
table: ['width', ...GENERIC_ALLOWED_ATTRIBUTES],
td: ['width', ...GENERIC_ALLOWED_ATTRIBUTES],
td: ['align', 'width', ...GENERIC_ALLOWED_ATTRIBUTES],
th: ['align', 'width', ...GENERIC_ALLOWED_ATTRIBUTES],
a: ['href', 'target', ...GENERIC_ALLOWED_ATTRIBUTES],
ol: ['start', ...GENERIC_ALLOWED_ATTRIBUTES],
ul: ['start', ...GENERIC_ALLOWED_ATTRIBUTES],
},
});
}
Expand Down
18 changes: 9 additions & 9 deletions packages/editor-sample/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/editor-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"@usewaypoint/block-html": "^0.0.3",
"@usewaypoint/block-image": "^0.0.5",
"@usewaypoint/block-spacer": "^0.0.3",
"@usewaypoint/block-text": "^0.0.5",
"@usewaypoint/block-text": "^0.0.6",
"@usewaypoint/document-core": "^0.0.6",
"@usewaypoint/email-builder": "^0.0.7",
"@usewaypoint/email-builder": "^0.0.8",
"highlight.js": "^11.9.0",
"prettier": "^3.2.5",
"react": "^18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function TextSidebarPanel({ data, setData }: TextSidebarPanelProp
/>
<BooleanInput
label="Markdown"
defaultValue={false}
defaultValue={data.props?.markdown ?? false}
onChange={(markdown) => updateData({ ...data, props: { ...data.props, markdown } })}
/>

Expand Down
12 changes: 6 additions & 6 deletions packages/email-builder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/email-builder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@usewaypoint/email-builder",
"version": "0.0.7",
"version": "0.0.8",
"description": "React component to render email messages",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down Expand Up @@ -35,7 +35,7 @@
"@usewaypoint/block-html": "^0.0.3",
"@usewaypoint/block-image": "^0.0.5",
"@usewaypoint/block-spacer": "^0.0.3",
"@usewaypoint/block-text": "^0.0.5",
"@usewaypoint/block-text": "^0.0.6",
"@usewaypoint/document-core": "^0.0.6"
}
}

0 comments on commit 512dd37

Please sign in to comment.