reportlab/platypus/paragraph.py
changeset 2938 5115bf2e8eeb
parent 2936 97860052e0fc
child 2940 a0e54b5117ce
--- a/reportlab/platypus/paragraph.py	Thu Jun 05 11:55:44 2008 +0000
+++ b/reportlab/platypus/paragraph.py	Wed Jun 18 13:03:25 2008 +0000
@@ -497,8 +497,8 @@
 
 _scheme_re = re.compile('^[a-zA-Z][-+a-zA-Z0-9]+$')
 def _doLink(tx,link,rect):
-    if type(link) is unicode:
-        link = unicode.encode('utf8')
+    if isinstance(link,unicode):
+        link = link.encode('utf8')
     parts = link.split(':',1)
     scheme = len(parts)==2 and parts[0].lower() or ''
     if _scheme_re.match(scheme) and scheme!='document':