Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequence search track #3159

Merged
merged 17 commits into from
Aug 25, 2022
18 changes: 12 additions & 6 deletions packages/core/ui/SanitizedHTML.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,18 @@ export default function SanitizedHTML({ html }: { html: string }) {
// see https://github.com/cure53/DOMPurify/issues/317
// only have to add this once, and can't do it globally because dompurify
// not yet initialized at global scope
dompurify.addHook('afterSanitizeAttributes', node => {
if (node.tagName === 'A') {
node.setAttribute('rel', 'noopener noreferrer')
node.setAttribute('target', '_blank')
}
})
dompurify.addHook(
'afterSanitizeAttributes',
(node: {
tagName: string
setAttribute: (arg0: string, arg1: string) => void
}) => {
if (node.tagName === 'A') {
node.setAttribute('rel', 'noopener noreferrer')
node.setAttribute('target', '_blank')
}
},
)
}

return (
Expand Down
6 changes: 5 additions & 1 deletion packages/core/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,11 @@ export const isElectron = /electron/i.test(
)

export function revcom(seqString: string) {
return complement(seqString).split('').reverse().join('')
return reverse(complement(seqString))
}

export function reverse(seqString: string) {
return seqString.split('').reverse().join('')
}

export const complement = (() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -379,7 +379,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -413,7 +413,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -447,7 +447,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -481,7 +481,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -515,7 +515,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -549,7 +549,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -583,7 +583,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -617,7 +617,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -651,7 +651,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -685,7 +685,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down Expand Up @@ -719,7 +719,7 @@ exports[`open up a widget 1`] = `
class="MuiFormControlLabel-root MuiFormControlLabel-labelPlacementEnd css-j204z7-MuiFormControlLabel-root"
>
<span
class="MuiCheckbox-root MuiCheckbox-colorPrimary MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary tss-18u5im4-compact css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
>
<input
class="PrivateSwitchBase-input css-1m9pwf3"
Expand Down
Loading