File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import sys
3
3
import re
4
- from pathlib import Path
5
- from github import Github
6
- from typing import List , Dict
7
4
import itertools
8
5
import requests
9
6
import hashlib
10
7
8
+ from urllib .parse import quote
9
+ from pathlib import Path
10
+ from github import Github
11
+ from typing import List , Dict
12
+
11
13
HTML_TEMPLATE = """<!DOCTYPE html>
12
14
<html>
13
15
<head>
@@ -94,7 +96,7 @@ def generate_index_html(self):
94
96
f .write (chunk )
95
97
96
98
sha256_hash = calculate_sha256 (package_dir / filename )
97
- file_links .append (f'<a href="{ filename } #sha256={ sha256_hash } ">{ filename } </a><br/>' )
99
+ file_links .append (f'<a href="{ quote ( filename ) } #sha256={ sha256_hash } ">{ filename } </a><br/>' )
98
100
99
101
package_index = HTML_TEMPLATE .format (
100
102
package_name = f"Links for { package } " ,
You can’t perform that action at this time.
0 commit comments