Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -135,6 +135,12 @@ def publish_paper(title, authors, tags, abst, data):
|
|
135 |
idx += 1
|
136 |
if idx > 100:
|
137 |
return "could not generate paperid, try again tomorrow"
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
metadata = f"""---
|
139 |
title: {title}
|
140 |
author: {authors}
|
|
|
135 |
idx += 1
|
136 |
if idx > 100:
|
137 |
return "could not generate paperid, try again tomorrow"
|
138 |
+
bad_chars = "<>:|\\" # primitive anti-xss sanitization
|
139 |
+
for c in bad_chars:
|
140 |
+
title = title.replace(c, "")
|
141 |
+
authors = authors.replace(c, "")
|
142 |
+
tags = tags.replace(c, "")
|
143 |
+
abst = abst.replace(c, "")
|
144 |
metadata = f"""---
|
145 |
title: {title}
|
146 |
author: {authors}
|