html escape html
This commit is contained in:
parent
6551de89e8
commit
9599a0e600
|
@ -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"""
|
||||
<tr class="{tdClass}">
|
||||
<td>{file.path_from_src}</td>
|
||||
<td>{file.tags.title}</td>
|
||||
<td>{file.tags.artist}</td>
|
||||
<td>{file.extension}</td>
|
||||
<td>{data_path}</td>
|
||||
<td>{data_title}</td>
|
||||
<td>{data_artist}</td>
|
||||
<td>{data_extension}</td>
|
||||
</tr>
|
||||
"""
|
||||
isOdd = not isOdd
|
||||
|
|
Loading…
Reference in a new issue