修复文件名转义问题

This commit is contained in:
shuaikangzhou 2024-01-06 13:33:39 +08:00
parent 15fc176749
commit f6f2eb6fd6
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@ import time
from PyQt5.QtCore import QTimer from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QDialog, QVBoxLayout, QCheckBox, QHBoxLayout, \ from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QDialog, QVBoxLayout, QCheckBox, QHBoxLayout, \
QProgressBar, QLabel, QMessageBox QProgressBar, QLabel, QMessageBox, QComboBox
from app.DataBase.output_pc import Output from app.DataBase.output_pc import Output

View File

@ -114,11 +114,11 @@ def music_share(data: bytes):
website_name = get_website_name(link_url) website_name = get_website_name(link_url)
return { return {
'type': msg_type, 'type': msg_type,
'title': title, 'title': escape_js_and_html(title),
'artist': artist, 'artist': escape_js_and_html(artist),
'link_url': link_url, 'link_url': link_url,
'audio_url': audio_url, 'audio_url': audio_url,
'website_name': website_name, 'website_name': escape_js_and_html(website_name),
"is_error": False "is_error": False
} }
except Exception as e: except Exception as e:
@ -248,11 +248,11 @@ def file(bytes_extra, compress_content, output_path):
file_path = get_file(bytes_extra, file_name, output_path) file_path = get_file(bytes_extra, file_name, output_path)
return { return {
'type': msg_type, 'type': msg_type,
'file_name': file_name, 'file_name': escape_js_and_html(file_path),
'file_len': file_len, 'file_len': file_len,
'file_ext': file_ext, 'file_ext': file_ext,
'file_path': file_path, 'file_path': file_path,
'app_name': app_name, 'app_name': escape_js_and_html(app_name),
"is_error": False "is_error": False
} }
except Exception as e: except Exception as e: