Skip to content

Commit

Permalink
Add MD link
Browse files Browse the repository at this point in the history
  • Loading branch information
okaycj committed Mar 28, 2024
1 parent 471b96b commit afe5d14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/lookit-api/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const CONFIG = <const>{url_base : "/api/v2/"};
const CONFIG = <const>{ url_base: "/api/v2/" };

export async function get<T>(url: string) {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/surveys/src/survey.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "text"
},
{
"description": "Only authorized researchers will have access to information in the library. Researchers who are granted access must agree to maintain confidentiality and not use information for commercial purposes. Data sharing will lead to faster progress in research on human development and behavior. If you have any questions about the data-sharing library, please visit https://nyu.databrary.org/ or email [email protected].",
"description": "Only authorized researchers will have access to information in the library. Researchers who are granted access must agree to maintain confidentiality and not use information for commercial purposes. Data sharing will lead to faster progress in research on human development and behavior. If you have any questions about the data-sharing library, please visit [Databrary](https://nyu.databrary.org/) or email [email protected].",
"isRequired": true,
"name": "databraryShare",
"title": "Would you like to share your video and other data from this session with authorized users of the secure data library Databrary?",
Expand Down
8 changes: 4 additions & 4 deletions packages/surveys/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import { marked } from "marked";
import { Model } from "survey-jquery";

const CONFIG = <const>{
MARKED: { async: false },
DOMPURIFY: { USE_PROFILES: { html: true } },
marked: { async: false },
dompurify: { USE_PROFILES: { html: true } },
};

export function survey_function(survey: Model) {
survey.onTextMarkdown.add((_sender, options) => {
// We can set the type as "string" because async is false.
options.html = DOMPurify.sanitize(
marked.parseInline(options.text, CONFIG.MARKED) as string,
CONFIG.DOMPURIFY,
marked.parseInline(options.text, CONFIG.marked) as string,
CONFIG.dompurify,
);
});
return survey;
Expand Down

0 comments on commit afe5d14

Please sign in to comment.