Skip to content

Commit

Permalink
Fixing markdown allowed attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
cohitre committed Jun 3, 2024
1 parent bcb1daf commit 5428bc8
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 14 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
21 changes: 17 additions & 4 deletions packages/editor-sample/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/editor-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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",
"@usewaypoint/email-builder": "^0.0.7",
"highlight.js": "^11.9.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/email-builder/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/email-builder/package.json
Original file line number Diff line number Diff line change
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 5428bc8

Please sign in to comment.