~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/tutorial/__init__.py

  • Committer: mattgiuca
  • Date: 2008-03-15 12:39:10 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:708
tutorial: Proper escaping of exercise title and pre-placed solutions.
console: Reduced pop-up console height from 20em to 15em.
    Percentage didn't work ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
356
356
        exercisepartial = saved_text
357
357
 
358
358
    # Print this exercise out to HTML 
359
 
    req.write("<p><b>Exercise:</b> %s</p>\n" % exercisename)
 
359
    req.write("<p><b>Exercise:</b> %s</p>\n" % cgi.escape(exercisename))
360
360
    if exercisedesc is not None:
361
361
        req.write("<div>%s</div>\n" % exercisedesc)
362
362
    filename = cgi.escape(cjson.encode(exercisesrc), quote=True)
 
363
    exercisepartial = cgi.escape(exercisepartial)
363
364
    req.write('<textarea class="exercisebox" '
364
365
        'onkeypress="set_saved_status(&quot;exercise%s&quot;, %s, '
365
366
            '&quot;Save&quot;)" '