Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replaced new line with <br>

  • Loading branch information...
commit e40bd6523e7557799c26cc215d011a87062af4ce 1 parent 581cd80
@swvist authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 questiondb.py
View
10 questiondb.py
@@ -17,12 +17,12 @@ def getQuestion(num):
if q:
return ("{"+
"\"num\" : " + "\""+str(q.questionNumber)+"\""+","+
- "\"question\" : "+"\""+q.question.replace('\n','<br />')+"\""+","+
+ "\"question\" : "+"\""+q.question.replace('\r\n','<br />')+"\""+","+
"\"image\" : "+"\""+q.qimage+"\""+","+
"\"options\" : " + "["+
- "\""+q.opt1.replace('\n','<br />')+"\""+","+
- "\""+q.opt2.replace('\n','<br />')+"\""+","+
- "\""+q.opt3.replace('\n','<br />')+"\""+","+
- "\""+q.opt4.replace('\n','<br />')+"\""+
+ "\""+q.opt1.replace('\r\n','<br />')+"\""+","+
+ "\""+q.opt2.replace('\r\n','<br />')+"\""+","+
+ "\""+q.opt3.replace('\r\n','<br />')+"\""+","+
+ "\""+q.opt4.replace('\r\n','<br />')+"\""+
"]"+
"}")
Please sign in to comment.
Something went wrong with that request. Please try again.