mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
440ee10fa5
2 changed files with 9 additions and 3 deletions
|
@ -1,13 +1,15 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block pagetitle %}
|
||||
Royal Games
|
||||
{{ royal.username }}
|
||||
{% endblock %}
|
||||
|
||||
{% block posthead %}
|
||||
{% if css %}
|
||||
<style>
|
||||
{{ css.css }}
|
||||
{% autoescape false %}
|
||||
{{ css.css }}
|
||||
{% endautoescape %}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -108,8 +108,12 @@ def page_setcss():
|
|||
if user_id is None:
|
||||
abort(403)
|
||||
return
|
||||
css = request.form.get("css", "")
|
||||
if "<style" in css:
|
||||
abort(400)
|
||||
return
|
||||
if ccss is None:
|
||||
ccss = db.CustomCSS(royal_id=user_id, css=request.form.get("css", ""))
|
||||
ccss = db.CustomCSS(royal_id=user_id, css=css)
|
||||
db_session.add(ccss)
|
||||
else:
|
||||
ccss.css = request.form.get("css", "")
|
||||
|
|
Loading…
Reference in a new issue