Skip to content

Commit

Permalink
fix: Incomplete multi-character sanitation (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Sep 20, 2023
1 parent 2915dde commit 7e31b2e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.14.9",
"@types/geojson": "^7946.0.10",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"@types/geojson": "^7946.0.10",
"docx": "^8.2.2",
"eslint": "^8.49.0",
"fast-xml-parser": "^4.2.7",
Expand All @@ -69,6 +69,7 @@
"prettier": "^3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"striptags": "^3.2.0",
"type-fest": "^4.3.1",
"uuid": "^9.0.1",
"zod": "^3.22.2"
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion src/export/bops/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import isEmpty from "lodash.isempty";
import isNil from "lodash.isnil";
import striptags from "striptags";

import { getResultData } from "../../models/result";
import { sortBreadcrumbs } from "../../models/session/logic";
Expand Down Expand Up @@ -244,7 +245,7 @@ export function formatProposalDetails({
if (node.data?.policyRef) {
metadata.policy_refs = [
// remove html tags
{ text: node.data?.policyRef?.replace(/<[^>]*>/g, "").trim() },
{ text: striptags(node.data?.policyRef) },
];
}
return metadata;
Expand Down

0 comments on commit 7e31b2e

Please sign in to comment.