GSMEthesis commited on
Commit
7b02c3c
·
verified ·
1 Parent(s): fcb684e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -11
app.py CHANGED
@@ -1319,21 +1319,22 @@ def random_likert_questions():
1319
  st.markdown(f"## {current_group['title']}")
1320
 
1321
  if 'guide' in current_group:
1322
- st.markdown("""
 
1323
  <div class="guide-text" style="
1324
- display: flex;
1325
- flex-direction: column;
1326
- align-items: center;
1327
- background-color: #f0f2f6;
1328
- border-radius: 10px;
1329
- padding: 15px;
1330
  gap: 10px;
1331
  ">
1332
- {guide}
1333
  </div>
1334
- """.format(guide=current_group['guide']),
1335
- unsafe_allow_html=True
1336
- )
1337
 
1338
  # نمایش تمام سوالات این گروه
1339
  for question in current_group['questions']:
 
1319
  st.markdown(f"## {current_group['title']}")
1320
 
1321
  if 'guide' in current_group:
1322
+ # ترکیب CSS و HTML با جایگذاری امن
1323
+ guide_html = textwrap.dedent("""
1324
  <div class="guide-text" style="
1325
+ display: flex;
1326
+ flex-direction: column;
1327
+ align-items: center;
1328
+ background-color: #f0f2f6;
1329
+ border-radius: 10px;
1330
+ padding: 15px;
1331
  gap: 10px;
1332
  ">
1333
+ {}
1334
  </div>
1335
+ """).format(current_group['guide'])
1336
+
1337
+ st.markdown(guide_html, unsafe_allow_html=True)
1338
 
1339
  # نمایش تمام سوالات این گروه
1340
  for question in current_group['questions']: