kanha-upadhyay commited on
Commit
69ce36d
·
1 Parent(s): 6e0d75c

Sanitize proposal text by removing unwanted characters before replacement

Browse files
Files changed (1) hide show
  1. src/app.py +2 -1
src/app.py CHANGED
@@ -79,7 +79,8 @@ async def generate_proposal(data: dict):
79
  architecture_diagram_path, width=Inches(6)
80
  )
81
  else:
82
- para.text = para.text.replace(f"{{{key}}}", value)
 
83
  for run in para.runs:
84
  run.font.size = Pt(14)
85
  run.font.name = "Arial"
 
79
  architecture_diagram_path, width=Inches(6)
80
  )
81
  else:
82
+ clean_value = re.sub(r"[*#`]", "", value)
83
+ para.text = para.text.replace(f"{{{key}}}", clean_value)
84
  for run in para.runs:
85
  run.font.size = Pt(14)
86
  run.font.name = "Arial"