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

« back to all changes in this revision

Viewing changes to scripts/diffservice

  • Committer: mattgiuca
  • Date: 2008-06-16 05:21:09 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:772
diffservice: HTML-escape the output.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
from common import cgirequest
28
28
from cgi import parse_qs
 
29
import cgi
29
30
from os import path
30
31
import pysvn
31
32
import re
33
34
 
34
35
def htmlfy_diff(difftext):
35
36
    """Adds HTML markup to a udiff string"""
36
 
    output = difftext
 
37
    output = cgi.escape(difftext)
37
38
    match_file = re.compile(r'^([\+\-]{3})\s(\S+)\s\((.+)\)$',re.MULTILINE)
38
39
    match_range = re.compile(r'^\@\@ (.*) \@\@$',re.MULTILINE)
39
40
    match_add = re.compile(r'^\+(.*)$',re.MULTILINE)