Skip to content

Commit

Permalink
support: longer descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
henilp105 committed Mar 31, 2024
1 parent 8404e9c commit b47b6ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/validate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from app import app
import subprocess
import toml
import html
from mongo import db
from mongo import file_storage
from bson.objectid import ObjectId
Expand Down Expand Up @@ -85,7 +86,7 @@ def process_package(packagename: str) -> Tuple[bool, Union[dict, None], str]:

if result[1]['description'] == "README.md":
with open(f'static/temp/{packagename}/README.md', 'r') as file:
parsed_toml['description'] = file.read()
parsed_toml['description'] = html.escape(file.read()) # Sanitize HTML content

if result[0]==-1:
# Package verification failed
Expand Down

0 comments on commit b47b6ff

Please sign in to comment.