Skip to content

Commit

Permalink
Merge branch 'ian/fix-help-text-pointer-overlap' into ian/uat-change-…
Browse files Browse the repository at this point in the history
…section-help-text
  • Loading branch information
ianjon3s committed Nov 27, 2023
2 parents 3b14393 + 249e94c commit 9a9a65e
Show file tree
Hide file tree
Showing 7 changed files with 359 additions and 17 deletions.
2 changes: 2 additions & 0 deletions editor.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"classnames": "^2.3.2",
"core-js": "^3.31.0",
"date-fns": "^2.30.0",
"dompurify": "^3.0.6",
"dotenv": "^16.3.1",
"formik": "^2.4.2",
"graphql": "^16.8.1",
Expand Down Expand Up @@ -116,6 +117,7 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/dompurify": "^3.0.5",
"@types/draft-js": "^0.11.12",
"@types/jest": "^27.5.2",
"@types/jest-axe": "^3.5.5",
Expand Down
22 changes: 19 additions & 3 deletions editor.planx.uk/pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const HelpButtonWrapper = styled(Box)(({ theme }) => ({
width: HelpButtonMinWidth,
top: "-4px",
right: "-6px",
pointerEvents: "none",
[theme.breakpoints.up("md")]: {
width: "80px",
top: 0,
Expand All @@ -72,6 +73,7 @@ export const HelpButton = styled(Button)(({ theme }) => ({
boxShadow: "none",
fontSize: "1.125em",
filter: "drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.5))",
pointerEvents: "auto",
[theme.breakpoints.up("lg")]: {
minHeight: "48px",
fontSize: "1.25em",
Expand Down
3 changes: 2 additions & 1 deletion editor.planx.uk/src/ui/ReactMarkdownOrHtml.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Box from "@mui/material/Box";
import { styled, Theme } from "@mui/material/styles";
import DOMPurify from "dompurify";
import React from "react";
import ReactMarkdown from "react-markdown";
import { FONT_WEIGHT_SEMI_BOLD, linkStyle } from "theme";
Expand Down Expand Up @@ -56,7 +57,7 @@ export default function ReactMarkdownOrHtml(props: {
return (
<HTMLRoot
color={props.textColor}
dangerouslySetInnerHTML={{ __html: incrementHeaders }}
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(incrementHeaders) }}
id={props.id}
/>
);
Expand Down
4 changes: 3 additions & 1 deletion sharedb.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"private": true,
"dependencies": {
"@teamwork/websocket-json-stream": "^2.0.0",
"dompurify": "^3.0.6",
"jsdom": "^23.0.0",
"jsonwebtoken": "^8.5.1",
"pg": "^8.11.3",
"sharedb": "^3.3.1",
"sharedb": "^4.1.1",
"ws": "^8.14.2"
},
"scripts": {
Expand Down
Loading

0 comments on commit 9a9a65e

Please sign in to comment.