Skip to content

Commit cd496fd

Browse files
authored
Merge branch 'main' into image-preview
2 parents b27c170 + 1307393 commit cd496fd

File tree

7 files changed

+1208
-1169
lines changed

7 files changed

+1208
-1169
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"quick-lru": "^4.0.1",
3030
"rangy": "^1.3.1",
3131
"react": "^16",
32-
"react-aria-components": "^1.8.0",
32+
"react-aria-components": "^1.10.1",
3333
"react-dom": "^16",
3434
"react-intl": "<5.13",
3535
"react-loadable": "~5.5",

src/app/content/components/TableOfContents/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Header, HeaderText, SidebarPaneBody } from '../SidebarPane';
1616
import { LeftArrow, TimesIcon } from '../Toolbar/styled';
1717
import * as Styled from './styled';
1818
import { createTrapTab, useMatchMobileQuery, useMatchMobileMediumQuery, isSSR } from '../../../reactUtils';
19+
import { stripHtml } from '../../../utils';
1920

2021
interface SidebarProps {
2122
onNavigate: () => void;
@@ -126,7 +127,7 @@ function TocToggle({
126127
<Styled.SummaryWrapper>
127128
<Styled.ExpandIcon />
128129
<Styled.CollapseIcon />
129-
<Styled.SummaryTitle dangerouslySetInnerHTML={{ __html: title }} />
130+
<Styled.SummaryTitle dangerouslySetInnerHTML={{ __html: title }}/>
130131
</Styled.SummaryWrapper>
131132
</Styled.StyledTreeItemContent>
132133
);
@@ -214,7 +215,7 @@ function TocLeaf({
214215
section={section}
215216
id={item.id}
216217
key={item.id}
217-
textValue={item.title}
218+
textValue={stripHtml(item.title, true)}
218219
onAction={
219220
// Ignored until RAC and TS versions are compatible
220221
// istanbul ignore next
@@ -225,7 +226,7 @@ function TocLeaf({
225226
>
226227
<Styled.NavItem
227228
data-type={sectionType}
228-
textValue={item.title}
229+
textValue={stripHtml(item.title, true)}
229230
>
230231
<Styled.ContentLink
231232
ref={linkRef}
@@ -271,7 +272,7 @@ function TocSection({
271272
section={section}
272273
id={item.id}
273274
key={item.id}
274-
textValue={item.title}
275+
textValue={stripHtml(item.title, true)}
275276
onClick={() => handleTreeItemClick(item.id)}
276277
>
277278
<ArchiveTreeComponent

0 commit comments

Comments
 (0)