diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-06-06 16:32:22 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-06-06 16:32:22 +0000 |
| commit | 321a131c20d83b0a7061c2b4600c4d77dec5b7fe (patch) | |
| tree | ee75fb0601e22767b18e49102da30609837e03aa /src/components | |
| parent | 3a507ba9b2fde594950a09c9d7934d54561a187c (diff) | |
| parent | 4bc7873e037dd4760c32e3dda4a94462696684e6 (diff) | |
Merge branch 'cherry-pick-624af7ed' into 'master'
cherrypick parser fix into stable
See merge request pleroma/pleroma-fe!1836
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/rich_content/rich_content.jsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 7881e365..b16ab242 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -149,7 +149,9 @@ export default { // Handle tag nodes if (Array.isArray(item)) { const [opener, children, closer] = item - const Tag = getTagName(opener) + let Tag = getTagName(opener) + if (Tag.toLowerCase() === 'script') Tag = 'js-exploit' + if (Tag.toLowerCase() === 'style') Tag = 'css-exploit' const fullAttrs = getAttrs(opener, () => true) const attrs = getAttrs(opener) const previouslyMentions = currentMentions !== null |
