Subversion Repositories SmartDukaan

Rev

Rev 230 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 230 Rev 255
Line 3... Line 3...
3
 
3
 
4
@author: gaurav
4
@author: gaurav
5
'''
5
'''
6
 
6
 
7
def unescape(s):
7
def unescape(s):
-
 
8
    """
-
 
9
     Documentation for method unescape
-
 
10
     @param a string
-
 
11
     @return the same string but in the unesescape form i.e 
-
 
12
     '&lt;' replaced with '<'
-
 
13
     '&gt;' replaced with '>'
-
 
14
     '&amp;' replaced with '&'
-
 
15
    """
8
    s = s.replace("&lt;", "<")
16
    s = s.replace("&lt;", "<")
9
    s = s.replace("&gt;", ">")
17
    s = s.replace("&gt;", ">")
10
    s = s.replace("&amp;", "&")
18
    s = s.replace("&amp;", "&")
11
    return s
19
    return s
12
20