Skip to content

Commit 9792807

Browse files
authored
Merge pull request bids-standard#263 from djken2009/fix/data-url-encoding-issue-174
fix: properly encode JSON data in data URL for download link
2 parents a115575 + e9cd630 commit 9792807

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--
2+
A new scriv changelog fragment.
3+
4+
Uncomment the section that is right (remove the HTML comment wrapper).
5+
For top level release notes, leave all the headers commented out.
6+
-->
7+
8+
<!--
9+
### Added
10+
11+
- A bullet item for the Added category.
12+
13+
-->
14+
<!--
15+
### Changed
16+
17+
- A bullet item for the Changed category.
18+
19+
-->
20+
### Fixed
21+
22+
- Fixed json encoding issue in web log download (Issue #174).
23+
24+
<!--
25+
### Deprecated
26+
27+
- A bullet item for the Deprecated category.
28+
29+
-->
30+
<!--
31+
### Removed
32+
33+
- A bullet item for the Removed category.
34+
35+
-->
36+
<!--
37+
### Security
38+
39+
- A bullet item for the Security category.
40+
41+
-->
42+
<!--
43+
### Infrastructure
44+
45+
- A bullet item for the Infrastructure category.
46+
47+
-->

web/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function App() {
103103
</ul>
104104
<Summary data={validation.summary} />
105105
<a
106-
href={`data:application/json:${JSON.stringify(validation)}`}
106+
href={`data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(validation))}`}
107107
target="_blank"
108108
download="bids-validator-output.json"
109109
>

0 commit comments

Comments
 (0)