File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
33import re
4- from pathlib import Path
5- from github import Github
6- from typing import List , Dict
74import itertools
85import requests
96import hashlib
107
8+ from urllib .parse import quote
9+ from pathlib import Path
10+ from github import Github
11+ from typing import List , Dict
12+
1113HTML_TEMPLATE = """<!DOCTYPE html>
1214 <html>
1315 <head>
@@ -94,7 +96,7 @@ def generate_index_html(self):
9496 f .write (chunk )
9597
9698 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/>' )
98100
99101 package_index = HTML_TEMPLATE .format (
100102 package_name = f"Links for { package } " ,
You can’t perform that action at this time.
0 commit comments