Permalink
Browse files

Replaced new line with <br>

  • Loading branch information...
1 parent 581cd80 commit e40bd6523e7557799c26cc215d011a87062af4ce @swvist committed Oct 11, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 questiondb.py
View
@@ -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 />')+"\""+
"]"+
"}")

0 comments on commit e40bd65

Please sign in to comment.