diff --git a/musicutil/commands/genhtml_command.py b/musicutil/commands/genhtml_command.py index ee46134..17b7c8a 100644 --- a/musicutil/commands/genhtml_command.py +++ b/musicutil/commands/genhtml_command.py @@ -1,6 +1,8 @@ from musicutil.utils.load_tag_information import load_tag_information from musicutil.utils.scan_for_music import scan_for_music +from html import escape as escape_html + class GenHTMLArgs(): src: str dest: str @@ -80,12 +82,17 @@ class GenHTMLCommand(): for file in files: tdClass = "pure-table-odd" if isOdd else "pure-table-even" + data_path = escape_html(file.path_from_src) + data_title = escape_html(file.tags.title) + data_artist = escape_html(file.tags.artist) + data_extension = escape_html(file.extension) + html_content += f""" - {file.path_from_src} - {file.tags.title} - {file.tags.artist} - {file.extension} + {data_path} + {data_title} + {data_artist} + {data_extension} """ isOdd = not isOdd